mIRC Home    About    Download    Register    News    Help

Print Thread
#157668 27/08/06 09:23 AM
Joined: Aug 2006
Posts: 2
V
VvVvV Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
V
Joined: Aug 2006
Posts: 2
I don't know why this won't work...
Code:
on *:TEXT:!warn*:#:{
  if ($nick isop $chan) || ($nick ishop $chan) && (!%warnings.for. $+ $address($2,2)) {
    inc %warnings.for. $+ $address($2,2)
    notice $2 1st warning
  }
  elseif ($nick isop $chan) || ($nick ishop $chan) && (%warnings.for. $+ $address($2,2) == 1) {
    inc %warnings.for. $+ $address($2,2)
    notice $2 2nd warning
  }
  elseif ($nick isop $chan) || ($nick ishop $chan) && (%warnings.for. $+ $address($2,2) == 2) {
    inc %warnings.for. $+ $address($2,2)
    ban -ku $+ 5 $chan $2 2 3rd warning
  }
  elseif ($nick isop $chan) || ($nick ishop $chan) && (%warnings.for. $+ $address($2,2) == 3) {
    inc %warnings.for. $+ $address($2,2)
    notice $2 4nd warning
    mode $chan +b $address($2,2)
    kick $chan $2 4th warning
  }
}

Anyone?

#157669 27/08/06 09:43 AM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
try
(!$(% $+ warnings.for. $+ $address($2,2), 3 ))
($(% $+ warnings.for. $+ $address($2,2), 3 ) == 1)

etc

Last edited by billythekid; 27/08/06 09:44 AM.

billythekid
#157670 27/08/06 09:58 AM
Joined: Aug 2006
Posts: 2
V
VvVvV Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
V
Joined: Aug 2006
Posts: 2
thx, i dont get it but it works lol

#157671 27/08/06 10:26 AM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
it's down to the evaluation of the variables. in your example mirc will try to evaluate %warnings.for(which of course is $null) BEFORE it appends $address($2,2) which doesntr work, splitting the % and the var name forces it to string them together and then evaluate them using the $eval(or in this case the shortened $() ) to evaluate once the joining is done.


billythekid

Link Copied to Clipboard