User Control Panel
Advertisements

HELP US, HELP YOU!

help making owner for maya?

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help
View unanswered posts
Author Message
Calum
Not Yet a God
Not Yet a God


Joined: 21 Feb 2004
Posts: 373
Location: england
Reputation: 34.7Reputation: 34.7Reputation: 34.7

PostPosted: Tue Mar 02, 2004 7:52 pm    Post subject: Reply with quote

ive tried to make an owner for maya bot

Code:
<br />   foreach $owner (@owner) {<br />  if ($username eq $owner) {<br />     $isowner{$username} = 1;<br />     $isadmin{$username} = 1;<br />                        $ismod{$username} = 1;<br />  }<br />   }<br />   }

i have added this and this:
Code:
   if ($isowner{$username}) {<br />  open('owner','./Commands/owner.pl');<br />  @ownersub=<owner>;<br />  close('owner');<br />  $ownersub=join('',@ownersub);<br />  eval($ownersub);<br />        }


and changed the first line of admin and mod so they include owner
Code:
|| $isowner{$username}) {


and in commands i have added a .pl called owner with this in
Code:
# Mayabot public commands sub<br /><br />if ($msg =~ /^help|^menu|^commands/i) {<br />$menu = '';<br />open (FILE, "./Commands/Menu/owner.txt");<br />my @menu = <FILE>;<br />close(FILE);<br />chomp @menu;<br />foreach $line (@menu) {<br />$line =~ s/<char>/$comchar/g;<br />$menu .= $line . "\n";<br />}<br />chomp $menu;<br />&send($self, $menu, "$username");<br />goto end;<br />}<br /><br />#============================<br /><br /><br />if ($msg =~ /^shutdown/i) {<br />&send($self,"[SoluBot] Shutting down.", "$username");<br />exit(1);<br />}<br /><br />end:


and in the commands/menu i have added a .txt file called owner



any idea whats wrong
Back to top
jeanhub
Almost An Agent
Almost An Agent


Joined: 14 Feb 2004
Posts: 1138

Reputation: 50.7

PostPosted: Tue Mar 02, 2004 7:55 pm    Post subject: Reply with quote

Hey calum its simple in the owner.txt add his email and your done Razz



the people ...is it me Very Happy lol
Back to top
eric256
The Keymaker
The Keymaker


Joined: 03 May 2006
Posts: 2292
Location: Colorado
Reputation: 47Reputation: 47Reputation: 47Reputation: 47Reputation: 47

PostPosted: Tue Mar 02, 2004 7:56 pm    Post subject: Reply with quote

You don't happen to want to include whatever isn't working? From your post we don't know what errors you are getting or arnt, or how it is responding at all.
_________________
Eric256
Proud previous owner and current admin of Bot-depot.com
Back to top
Calum
Not Yet a God
Not Yet a God


Joined: 21 Feb 2004
Posts: 373
Location: england
Reputation: 34.7Reputation: 34.7Reputation: 34.7

PostPosted: Tue Mar 02, 2004 7:58 pm    Post subject: Reply with quote

well it runs the bot then it says tit hasnt benn configerd then i saye yes run config and it says the .pl for config is not therfe then it trys to run bot and it fails
Back to top
eric256
The Keymaker
The Keymaker


Joined: 03 May 2006
Posts: 2292
Location: Colorado
Reputation: 47Reputation: 47Reputation: 47Reputation: 47Reputation: 47

PostPosted: Tue Mar 02, 2004 8:10 pm    Post subject: Reply with quote

Thats a good example of what i mean by not proof reading. Unless you realy can't spell it, hasn't, been, configured,say and there.
_________________
Eric256
Proud previous owner and current admin of Bot-depot.com
Back to top
jeanhub
Almost An Agent
Almost An Agent


Joined: 14 Feb 2004
Posts: 1138

Reputation: 50.7

PostPosted: Wed Mar 03, 2004 12:09 am    Post subject: Reply with quote

QUOTE(jeanhub @ Mar 2 2004, 11:55 AM)
Hey calum its simple in the owner.txt add his email and your done Razz



the people ...is it me Very Happy lol

it was working now i tested it... NOT WORK Sad so me too i want to know how to add an owner .. Sad
Back to top
Urbansk8
Newbie
Newbie


Joined: 07 Mar 2004
Posts: 10
Location: UK
Reputation: 26.6Reputation: 26.6Reputation: 26.6

PostPosted: Mon Mar 08, 2004 9:01 pm    Post subject: Reply with quote

well i sorta mucked up my hole bot.. i changed my public.txt to look like a menu

1 - games
2 - bot
3 - mod
4 - admin..

and so on.. but i dont no what i did to make it go wrong but now wen an admin or mod start a chat with the bot and type !menu it just comes up with the public.txt and not admin.txt or mod.txt..

any i cant find a way of gettin it so when i type 4 in i goes to the admin.pl and runs the admin.txt so only the e-mail of the admin suplyed at the baggining will work.. but i cant work it out..

can somone help plz :blink:
Back to top
jeanhub
Almost An Agent
Almost An Agent


Joined: 14 Feb 2004
Posts: 1138

Reputation: 50.7

PostPosted: Mon Mar 08, 2004 10:15 pm    Post subject: Reply with quote

ok i tryed to make a command... not sure if its work...i dont tested it...

Code:
<br /><br />if ($msg eq "add owner")<br />{<br />   if (!exists $self->{callback})<br />   {<br />      $self->{callback} = 'add owner';<br />      &send($self, "Who would you like to add? Seperate emails by ,");<br />      return;<br />   }   <br />}<br /> else<br />{<br />   if ($self->{callback} eq 'add owner')<br />   {<br />      if ($msg eq "stop")<br />      {<br />         &send($self, "You have stopped.");<br />         delete $self->{callback};<br />         return;<br />      }<br />         foreach $name (split (/,/, $msg))<br />         {<br />            $name =~ s/ //g;<br />            $name = lc($name);<br />            open (FILE, ">>./Lib/Store/Owner.txt");<br />            print FILE "$name\n";<br />            close FILE;<br />            $reply .= "$name\n";<br />            delete $self->{callback};<br />         }<br />      &send($self, "You added these to the owner's list: \n\n$reply");<br />      delete $self->{callback};<br />      $reply = undef;<br />   }<br />}<br /><br />
Back to top
Urbansk8
Newbie
Newbie


Joined: 07 Mar 2004
Posts: 10
Location: UK
Reputation: 26.6Reputation: 26.6Reputation: 26.6

PostPosted: Mon Mar 08, 2004 11:51 pm    Post subject: Reply with quote

nope.. not sure if that works.. for me it just asks for an e-mail then wen *lazy* put in the e-mail it dont do nothing.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group