mIRC Home    About    Download    Register    News    Help

Print Thread
#182504 10/08/07 12:37 PM
Joined: May 2005
Posts: 74
D
Dracoz Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: May 2005
Posts: 74
Code:
on *:text:!del*:#corleone,#dracoz: {
  %host = $address($2,2)
  %invite = invite2.txt
  %check = $read(%invite, w, %host)
  if (%check != $null) && (*!*@ !isin $2) && ($nick isop $chan) && ($2 ison $chan) {
    write -ds $+ %host invite2.txt 
    .msg $chan  4 $2   0Is nu verwijderd uit de gebruikerslijst!
  }
  if ($2 ison #members.corleone) {
    .kick #hidden.gomorra $2   4Je toegang hier is  0verwijderd!
  }
  if (%check == $null) && (*!*@ isin $2) && ($nick isop $chan) {
    .write -ds $+ $2 invite2.txt 
    .msg $chan   4 $2 0Is nu 9verwijderd 12 uit de gebruikerslijst!
  }
  elseif ($nick !isop $chan) { 
    .msg $chan   4Je bent  0geen  12@ Operator! :P
  }
  elseif (%check == $null) {
    .msg $chan   4 $2  0Staat niet in de gebruikerslijst!
  }
  elseif ($2 !ison $chan) {
    .msg $chan   4 $2 0Is niet op dit kanaal!
  }
}


The meaning of this script is when someone types !del nickname
the nickname will be removed from the textfile.

But here's the bug, EVERYONE can type !del nickname and then the script will delete it..
I can't find the bug, and it must be so that only @ can use the !del command... Plz help ^^

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Code:
on *:text:!del*:#corleone,#dracoz: {
  if ($nick isop $chan) {
  rest of the code here
}
}


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Mar 2006
Posts: 47
C
Ameglian cow
Offline
Ameglian cow
C
Joined: Mar 2006
Posts: 47
Or add
Code:
if ($nick !isop $chan) return

but same difference. :P


Link Copied to Clipboard