|
|
Joined: May 2006
Posts: 87
Babel fish
|
OP
Babel fish
Joined: May 2006
Posts: 87 |
on *:TEXT:!kickprize:#:{
if ($1 == %c $+ !kickprize) {
msg $chan $2, you may kick/ban any member in the channel as long as they are not protected. The ban will last for 1 hour. To ban someone, use !kickban nick }
if (Sableye isin $nick) return
if (Abhishek isin $nick) return
else {
notice $nick Not allowed!
/set %kickprize $2
}
What the script is suppose to do is when a person uses !kickprize nick, that nick gets "you may kick/ban any member in the channel as long as they are not protected. The ban will last for 1 hour. To ban someone, use !kickban nick" message. I only want the command to work for Sableye and Abhishek. For some reason it's not working. Please point out the mistakes if there are any.
|
|
|
|
Joined: Mar 2003
Posts: 612
Fjord artisan
|
Fjord artisan
Joined: Mar 2003
Posts: 612 |
on *:TEXT:!kickprize*:#:{
if $istok(Sableye Abhishek , $2 , 32) {
msg $chan $2, you may kick/ban any member in the channel as long as they are not protected. The ban will last for 1 hour. To ban someone, use !kickban nick
set %kickprize $2
}
else {
msg $chan $2 Not allowed!
}
}
on *:TEXT:!kickban*:#:{
if $nick == %kickprize {
ban -u3600 $chan $2
kick $chan $2
}
}
That should work. btk [edit] added hour ban after re-reading your post.
Last edited by billythekid; 03/08/06 05:30 AM.
billythekid
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 400 |
:\, guess my script isn't needed lol
Last edited by Kurdish_Assass1n; 03/08/06 05:33 AM.
-Kurdish_Assass1n
|
|
|
|
Joined: May 2006
Posts: 87
Babel fish
|
OP
Babel fish
Joined: May 2006
Posts: 87 |
Your script only works for people who are not Sableye and Abhishek. I would like it to only work for Sableye and Abhishek.
Last edited by Sableye2; 03/08/06 04:38 PM.
|
|
|
|
Joined: Apr 2006
Posts: 400
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 400 |
change this
on *:TEXT:!kickban*:#:{
if $nick == %kickprize {
ban -u3600 $chan $2
kick $chan $2
}
}
to this:
on *:TEXT:!kickban*:#:{
if $nick != %kickprize {
ban -u3600 $chan $2
kick $chan $2
}
}
-Kurdish_Assass1n
|
|
|
|
Joined: May 2006
Posts: 87
Babel fish
|
OP
Babel fish
Joined: May 2006
Posts: 87 |
That doesn't really solve my problem.
|
|
|
|
Joined: Mar 2003
Posts: 612
Fjord artisan
|
Fjord artisan
Joined: Mar 2003
Posts: 612 |
if someone types !kickprize sableye the bot checks the name is sableye or abhishek and if so will say the message to channel
sableye you can kick/ban someone...blah blah.
then sableye types !kickban billythekid and the bot kicks and bans billythekid(if that nick is on channel)
it does work for only sableye and abhishek. Perhaps I have misunderstood your request.
btk
billythekid
|
|
|
|
Joined: May 2006
Posts: 87
Babel fish
|
OP
Babel fish
Joined: May 2006
Posts: 87 |
I only want Sableye and Abhishek to use !kickprize nick, but the nick in !kickprize nick can be anyone.
|
|
|
|
Joined: Mar 2003
Posts: 612
Fjord artisan
|
Fjord artisan
Joined: Mar 2003
Posts: 612 |
ahh gotcha
on *:TEXT:!kickprize*:#:{
if $istok(Sableye Abhishek , $nick , 32) {
msg $chan $2, you may kick/ban any member in the channel as long as they are not protected. The ban will last for 1 hour. To ban someone, use !kickban nick
set %kickprize $2
}
else {
msg $chan $nick you are not allowed to use that command!
}
}
on *:TEXT:!kickban*:#:{
if $nick == %kickprize {
ban -u3600 $chan $2
kick $chan $2
}
}
billythekid
|
|
|
|
Joined: Mar 2003
Posts: 612
Fjord artisan
|
Fjord artisan
Joined: Mar 2003
Posts: 612 |
I just realised to mention, if you are testing this for yourself you will need to create another connection in the channel. this is because a script will not react to an on text event from the local nick, you need to use on input for your own nick or create a second nick in channel(a bot)
btk
billythekid
|
|
|
|
Joined: May 2006
Posts: 87
Babel fish
|
OP
Babel fish
Joined: May 2006
Posts: 87 |
Thanks, that is working perfectly. One more thing:
It bans like this: Sableye!*PMGuest@adsl-65-42-86-227.dsl.chcgil.ameritech.net
Anyway to get it so that it bans like this? *!*@adsl-65-42-86-227.dsl.chcgil.ameritech.net
|
|
|
|
Joined: Apr 2006
Posts: 464
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 464 |
Try changing this line: ban -u3600 $chan $2
To: ban -u3600 $chan $mask($2,2)
I didn't test, but that should do it, I think...
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
or just /ban -u3600 $chan $2 2
|
|
|
|
|
|