mIRC Home    About    Download    Register    News    Help

Print Thread
#107656 12/01/05 09:03 AM
Joined: Nov 2004
Posts: 21
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2004
Posts: 21
Hello, I have written a script which bans people from a channel if the PM me. I was wondering whether there could be a way to put a list of nicks so it won't ban them when they PM.

Current script:
Code:
 on *:open:?:*:{ if $nick isreg #escapechat /ban -ku120 #Escapechat $nick 2 Read topic. Do not PM me. 2min ban. }

Please help ^_^

#107657 12/01/05 09:45 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Right click in a channel to configure your list..

Code:
menu channel {
  $iif($dialog(protect),$style(3)) Protect Users: { 
    dialog -dm protect protect
  }
}

dialog protect { 
  title "protect"  
  size -1 -1 84 132  
  option dbu  
  list 3,5 20 74 100, autohs, sort
  button "Add", 4, 5 119 16 9 , 
  button "Del", 5, 24 119 16 9 , 
  button "Close", 6, 59 119 20 9, ok 
}

on *:dialog:protect:init:*: {   
  did -b protect 5
  if ($exists(protect1.txt)) { 
    play -cs protect1.txt 0 
  }
}

on *:dialog:protect:sclick:3: {  
  set %protect.sel $did(3,$did(3).sel)  
  did -e protect 5
}

on *:dialog:protect:sclick:4: {   
  set %protect.add $$?="Enter Word:"
  write protect1.txt did -a protect 3 %protect.add   
  write protect2.txt %protect.add 
  did -a protect 3 %protect.add 
}

on *:dialog:protect:sclick:5: {  
  write -dw $+ "* $+ %protect.sel $+ *" protect1.txt   
  write -dw $+ "* $+ %protect.sel $+ *" protect2.txt   
  did -d protect 3 $did(protect,3).sel  
  did -b protect 5
}

on *:Open:?:*: {
  if ($read(protect2.txt,w,$+(,$nick))) { return }
  elseif ($nick isreg #escapechat) { ban -ku120 #Escapechat $nick 2 Read topic. Do not PM me. 2min ban. }
}

Last edited by SladeKraven; 12/01/05 09:51 AM.

Link Copied to Clipboard