mIRC Home    About    Download    Register    News    Help

Print Thread
#155027 03/08/06 03:59 AM
Joined: May 2006
Posts: 87
S
Babel fish
OP Offline
Babel fish
S
Joined: May 2006
Posts: 87
Code:
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.

#155028 03/08/06 05:25 AM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
Code:
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
#155029 03/08/06 05:26 AM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
:\, guess my script isn't needed frown lol

Last edited by Kurdish_Assass1n; 03/08/06 05:33 AM.

-Kurdish_Assass1n
#155030 03/08/06 04:33 PM
Joined: May 2006
Posts: 87
S
Babel fish
OP Offline
Babel fish
S
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.
#155031 03/08/06 04:45 PM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
change this
Code:
on *:TEXT:!kickban*:#:{
  if $nick == %kickprize { 
    ban -u3600 $chan $2
    kick $chan $2
  }
}

to this:
Code:
on *:TEXT:!kickban*:#:{
  if $nick != %kickprize { 
    ban -u3600 $chan $2
    kick $chan $2
  }
}


-Kurdish_Assass1n
#155032 03/08/06 11:45 PM
Joined: May 2006
Posts: 87
S
Babel fish
OP Offline
Babel fish
S
Joined: May 2006
Posts: 87
That doesn't really solve my problem. frown

#155033 03/08/06 11:56 PM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
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
#155034 04/08/06 12:15 AM
Joined: May 2006
Posts: 87
S
Babel fish
OP Offline
Babel fish
S
Joined: May 2006
Posts: 87
I only want Sableye and Abhishek to use !kickprize nick, but the nick in !kickprize nick can be anyone.

#155035 04/08/06 12:52 AM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
ahh gotcha

Code:
 
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
#155036 04/08/06 01:00 AM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
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
#155037 04/08/06 02:18 AM
Joined: May 2006
Posts: 87
S
Babel fish
OP Offline
Babel fish
S
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

#155038 04/08/06 05:34 AM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
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...

#155039 04/08/06 07:14 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
or just /ban -u3600 $chan $2 2


Link Copied to Clipboard