User Control Panel
Advertisements

HELP US, HELP YOU!

Admin

 
Post new topic   Reply to topic    Bot Depot Forum Index -> MSN Protocol
View unanswered posts
Author Message
Vorx
Senior Member
Senior Member


Joined: 21 Dec 2003
Posts: 152

Reputation: 32Reputation: 32Reputation: 32

PostPosted: Tue Dec 30, 2003 7:57 pm    Post subject: Reply with quote

Hi,

I have more than 1 administrator for my bot, and in the $admin bit of my bot it is like so:

$admin = 'vorx@vorx.co.uk|helder@alexispro.com';

Then on a command I have this:

Code:
<br />sub admin {<br /><br />$adminonly = 1;<br />#open the admin txt <br />open (FILE, "admin.txt");<br />$admin = <FILE>;<br />close(FILE);<br /><br />if($adminonly == 1 && $victim ne "$admin") {<br /><br />  $reply = "Only BOTRIX Admins can view this menu";<br />  <br />  } else {<br />  <br /><br />$reply  = ":alert {message}\n";<br />$reply .= ":name {new name}\n";<br />$reply .= ":refresh\n";<br /><br />}<br />}<br />1;<br />


And I have checked the admin.txt file and it shows:

vorx@vorx.co.uk|helder@alexispro.com

Yet when either of us try the command it doesn't show us the command, it shows us the:

$reply = "Only BOTRIX Admins can view this menu";

I hope someone can help as I need some sort of admin protection on some commands.

Thanks
Back to top
Nate
God Like
God Like


Joined: 12 Nov 2003
Posts: 553

Reputation: 41.3Reputation: 41.3Reputation: 41.3Reputation: 41.3

PostPosted: Tue Dec 30, 2003 8:13 pm    Post subject: Reply with quote

You can look up the post about having multiple admins/mods, this code should also work:

Code:
if($adminonly == 1 && $admin !~ /$victim/) {


That says "if $admin doesn't contain $victim, they're not an admin"
Back to top
Vorx
Senior Member
Senior Member


Joined: 21 Dec 2003
Posts: 152

Reputation: 32Reputation: 32Reputation: 32

PostPosted: Tue Dec 30, 2003 8:16 pm    Post subject: Reply with quote

Hi and thanks for the reply.

Where does that code go that you posted?

And do you know the link to this post you recommended?
Back to top
Nate
God Like
God Like


Joined: 12 Nov 2003
Posts: 553

Reputation: 41.3Reputation: 41.3Reputation: 41.3Reputation: 41.3

PostPosted: Tue Dec 30, 2003 8:20 pm    Post subject: Reply with quote

The code I just wrote would replace the line in your command that looks like that (with the if $adminonly == 1 part)

Here's the link to the isAdmin thing: http://www.bot-depot.com/forums/index.php?showtopic=112&st=0
Back to top
Vorx
Senior Member
Senior Member


Joined: 21 Dec 2003
Posts: 152

Reputation: 32Reputation: 32Reputation: 32

PostPosted: Tue Dec 30, 2003 8:25 pm    Post subject: Reply with quote

Thanks Nate, i'll let you know how it goes.

Nate, I'm not sure if I can use that post you linked to, because it looks like Erics bot template and I use Wiredbots so I'm unsure about putting anything in the actual bot.pl file.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> MSN Protocol 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