mIRC Home    About    Download    Register    News    Help

Print Thread
#144323 09/03/06 07:46 AM
Joined: Jan 2004
Posts: 129
A
AaronL Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: Jan 2004
Posts: 129
Hi all.

I have a line in my bot that kickbans on a /msg bot ko etc.

strange thing is however that the line doesn't seems to work as it does.

Code:
  
on *:text:*:?: { 
  if ($$1 == ko) { 
set %usedname $$2
 CheckOps 
 set %kickmessage Sorry, but this is a Ops room 
 if (%allowed == ON) || (%usedname ==  Aaron) { 
if (%usedname isop $chan) { 
/notice $nick Sorry $nick $+ , i dont kickban Ops 
 halt
 }
 /ban -k $chan %usedname %kickmessage 
set %allowed OFF
  } 
 }
}


Can someone tell me whats wrong with this code confused

Greetz
Aaron


Deridio fatum
#144324 09/03/06 07:56 AM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
Try this

Code:
on *:text:*:?: { 
  if ($$1 == ko) { 
    set %usedname $$2
    CheckOps 
    set %kickmessage Sorry, but this is a Ops room 
    if (%allowed == ON) || (%usedname ==  Aaron) { 
      if (%usedname isop $chan) { 
        notice $nick Sorry $nick $+ , i dont kickban Ops 
      }
      else {
        ban -k $chan %usedname %kickmessage 
        set %allowed OFF
      }
    } 
  }
}

#144325 09/03/06 01:12 PM
Joined: Feb 2006
Posts: 11
P
Pikka bird
Offline
Pikka bird
P
Joined: Feb 2006
Posts: 11
I'm not sure it will work because the location is in private message not channel

Code:
ban -k $chan %usedname %kickmessage


u should change $chan with another identifier


get more mIRC snipets, add-ons and scripts from http://www.oyr79.com/mirc
#144326 10/03/06 12:11 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Actually, $chan would have to be replaced with the actual channel name or with a variable that contains the channel name. If there's more than one channel possible, then the code would have to be re-worked to check for all of the possible channels (and no, in this case putting mnultiple channels into a variable then using the variable directly would not work)

#144327 13/03/06 11:29 AM
Joined: Jan 2004
Posts: 129
A
AaronL Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: Jan 2004
Posts: 129
first.. sorry for the late reaction

I changed the $chan into the actual channelname and its woking fine now.
Thanks all for the fast reply

Greetz
Aaron


Deridio fatum

Link Copied to Clipboard