mIRC Home    About    Download    Register    News    Help

Print Thread
#178762 14/06/07 12:27 PM
Joined: May 2007
Posts: 12
J
johay Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: May 2007
Posts: 12
I'm trying to make this, little kickban thing in, remotes. I'm pretty new. to irc, scripting, and not all that good to be honest..

My code is this:
Code:
on *:TEXT:!kban *:#:{
  if ($nick == nick2) ban $chan $2 $3 
  kick $chan $1 $2  
}

If nick = nick2 and i type !kban nick3 Reason
It should kickban nick3 with the reason "Reason"
But All i get the other irc client (Where i place the code is)
kick No such nick/channel

johay #178763 14/06/07 12:35 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
on @*:TEXT:!kban *:#:{
  if ($2 ison #) ban -k # $2 2 $3-  
}


You have to be opped to use this command though.

!kban <nick> <reason>

SladeKraven #178764 14/06/07 12:42 PM
Joined: May 2007
Posts: 12
J
johay Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: May 2007
Posts: 12
Originally Posted By: SladeKraven
Code:
on @*:TEXT:!kban *:#:{
  if ($2 ison #) ban -k # $2 2 $3-  
}


You have to be opped to use this command though.

!kban <nick> <reason>


Yeah, I'm opped It did work, thanks very much, but the only problem would be the irc client where the code is is opeped, so if a voice type !kban nick it would work.

johay #178769 14/06/07 12:54 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
on *:TEXT:!kban *:#:{
  if ($nick(#,$nick,ov)) ban -k # $2 2 $3-  
}


Try that.

SladeKraven #178774 14/06/07 01:42 PM
Joined: May 2005
Posts: 54
M
Babel fish
Offline
Babel fish
M
Joined: May 2005
Posts: 54
Interesting.And to remove a banmask ? eek


/server IRC.RomaniaIRC.ORG
Mlupu #178777 14/06/07 02:24 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Change your code to this, here you can easily add your own commands now, just put your new lines under elseif.
Code:
on *:TEXT:*:#:{
  if (!* iswm $1) {
    if ($nick(#,$nick,ov)) {
      if ($1 == !kban) ban -k # $2 2 $3-
      elseif ($1 == !unban) mode # $+(-,$str(b,$numtok($2-,32))) $2-
    }
  }
}


Just put the banmasks you want to remove like so:

!unban Andy!*@* SladeKraven!*@* Mlupu!*@*

SladeKraven #178780 14/06/07 02:39 PM
Joined: May 2005
Posts: 54
M
Babel fish
Offline
Babel fish
M
Joined: May 2005
Posts: 54
yep, thanks.


/server IRC.RomaniaIRC.ORG

Link Copied to Clipboard