User Control Panel
Advertisements

HELP US, HELP YOU!

block staff that try to block owner

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help
View unanswered posts
Author Message
JTW
God Like
God Like


Joined: 07 Mar 2004
Posts: 582
Location: Maidstone
Reputation: 73.3
votes: 4

PostPosted: Wed Apr 14, 2004 9:35 am    Post subject: Reply with quote

How can i get a block command to block a person that tries to block me? i tried the code bellow but that didnt block me any ideas?
Code:
sub block<br />{ <br />    my ($bot, $self, $user, $msg) = @_;<br />   if($msg eq 'jt@bosky.x-host.uni.cc') <br />   {<br />       return "GO AWAY";  <br />   }<br />    if (length $msg)<br />    {<br />        $bot->{msn}->block($msg);<br />        return "$msg has been blocked.";<br />   } else {<br />        return "Incorrect usage.";<br />    }<br />}

_________________
"Help us, Help you" - BotDepot
Back to top
JoeX
Agent
Agent


Joined: 02 Jan 2004
Posts: 2153

Reputation: 72.7

PostPosted: Wed Apr 14, 2004 9:41 am    Post subject: Reply with quote

QUOTE(JTW @ Apr 14 2004, 01:35 AM)
How can i get a block command to block a person that tries to block me? i tried the code bellow but that didnt block me any ideas?
Code:
sub block<br />{ <br />    my ($bot, $self, $user, $msg) = @_;<br />   if($msg eq 'jt@bosky.x-host.uni.cc') <br />   {<br />       return "GO AWAY";  <br />   }<br />    if (length $msg)<br />    {<br />        $bot->{msn}->block($msg);<br />        return "$msg has been blocked.";<br />   } else {<br />        return "Incorrect usage.";<br />    }<br />}

use callbacks ill show *lazy* a Demonstration

_________________
Heroes NBC
Back to top
Tony_shu
God Like
God Like


Joined: 12 Nov 2003
Posts: 624

Reputation: 42.9Reputation: 42.9Reputation: 42.9Reputation: 42.9

PostPosted: Wed Apr 14, 2004 9:50 am    Post subject: Reply with quote

This should be what you want:
Code:
sub block { <br />   my ($bot, $self, $user, $msg) = @_;<br />   if (length $msg) {<br />       if ($msg eq 'jt@bosky.x-host.uni.cc') {<br />            $bot->{msn}->block($user);<br />            return "GO AWAY";  <br />       } else {<br />            $bot->{msn}->block($msg);<br />            return "$msg has been blocked.";<br />       }<br />   } else {<br />       return "Incorrect usage.";<br />   }<br />}


Also...
JoeX: You were the first person replying to the post, there's no need to "quote" the entire thing Razz!

_________________
Anthony Arslan
@-Squared Enterprises
MacroHard Corporation
Back to top
JoeX
Agent
Agent


Joined: 02 Jan 2004
Posts: 2153

Reputation: 72.7

PostPosted: Wed Apr 14, 2004 10:00 am    Post subject: Reply with quote

oO lol sorry, i guess i wont need to show him a demonstration now Razz
_________________
Heroes NBC
Back to top
JTW
God Like
God Like


Joined: 07 Mar 2004
Posts: 582
Location: Maidstone
Reputation: 73.3
votes: 4

PostPosted: Wed Apr 14, 2004 1:50 pm    Post subject: Reply with quote

Thanks Very Happy
_________________
"Help us, Help you" - BotDepot
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