mIRC Home    About    Download    Register    News    Help

Print Thread
#17840 02/04/03 02:57 PM
Joined: Jan 2003
Posts: 21
J
Jay_T Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2003
Posts: 21
raw 352:*:{
inc % $+ $+($2,.,$4)
}
#JoinPart1 on
on *:join:#:{
if ($nick == $me) {
unset % $+ $chan $+ *
.IAL
}
else {
inc % $+ $+($chan,.,$site)
if ($me isop $chan) {
if ([ %stop. [ $+ [ $chan ] ] ] == $null) {
var %f = $dll(aircdll.dll,Flood,$+(floodjoin,$chr(164),$site,$chr(164),$chan) 1 5 2)
if (+FLOOD* iswm %f) {
set -u5 %stop. [ $+ [ $chan ] ] 1
set %shitaddress $address($nick,2)
set %chan.scan $chan
set %chan.num 1
set %tmpclones 1
mode $chan +bm %shitaddress | echo -a %d1 co' Flood # kia` $me %d2 %ver
.timerscan 1 1 scanscan $chan %shitaddress
.timerkickclones1 1 2 kickuser $chan clones
}
}
elseif ($wildsite == %shitaddress) {
.auser clones $nick
}
if ([ %stop. [ $+ [ $chan ] ] ] == $null) {
inc %numjoin. [ $+ [ $chan ] ] 1
hadd -mu3 $chan %numjoin. [ $+ [ $chan ] ] $nick $wildsite
.timer 1 3 dec %numjoin. [ $+ [ $chan ] ] 1
if (%numjoin. [ $+ [ $chan ] ] == 8) {
set -u5 %stop. [ $+ [ $chan ] ] 1
mode $chan +mRx
.timers off
%numberclone = 1
while $hget($chan,%numberclone) {
hadd -m $+(clone.,$chan) %numberclone $hget($chan,%numberclone)
inc %numberclone 1
}
unset %numjoin. [ $+ [ $chan ] ] | hfree $chan
var %i = 1
while ($hget($+(clone.,$chan),%i).item) {
hadd -m $+(Ipfake.,$chan) $gettok($hget($+(clone.,$chan),%i).data,2,32) Yes
inc %i 1
}
.timerbanclonefakeip -m 0 1000 banm $chan
}
}
else {
hadd -m $+(clone.,$chan) %numberclone $nick $wildsite | inc %numberclone 1
hadd -m $+(Ipfake.,$chan) $wildsite Yes
}
}
}
}
alias stop .timers off
alias scanscan {
var %thenumclone 1
while (%thenumclone <= $ialchan($2,$1,0)) {
if ($ialchan($2,$1,%thenumclone).nick != $me) {
.auser clones $ialchan($2,$1,%thenumclone).nick
inc %thenumclone 1
}
else { inc %thenumclone 1 }
}
}
alias kickuser .timerkickuser -m 0 1000 kickuser1 $1 $2
alias kickuser1 {
if (%tmpusers == $null) { %tmpusers = 1 }
:loop
if $ulist(*,$2,%tmpusers) {
else { %thenumclones = th }
if ($ulist(*,$2,%tmpusers) ison $1) {
if (%tmpusers == 1) { %thenumclones = st }
if (%tmpusers == 2) { %thenumclones = nd }
if (%tmpusers == 3) { %thenumclones = rd }
kick $1 $ulist(*,$2,%tmpusers) %tmpusers $+ %thenumclones of $ulist(*,$2,0) %ver
inc %tmpusers 1
}
else { inc %tmpusers 1 | goto loop }
}
else {
stop
.rlevel clones
mode $1 -mRx
unset %tmpusers %thenumclones %shitaddress
}
}
alias banm {
if (!%i) { %i = 1 }
if ($hget($+(ipfake.,$1),%i).item) {
mode $1 +bbbbbb $hget($+(ipfake.,$1),%i).item $hget($+(ipfake.,$1),$calc(%i + 1)).item $hget($+(ipfake.,$1),$calc(%i + 2)).item $hget($+(ipfake.,$1),$calc(%i + 3)).item $hget($+(ipfake.,$1),$calc(%i + 4)).item $hget($+(ipfake.,$1),$calc(%i + 5)).item
inc %i 6
}
else {
.timerbanclonefakeip off | unset %i
var %i = 1
while ($hget($+(ipfake.,$1),%i).item) {
inc %i 1
}
.timerkickcloneFakeip -m 0 2000 kickclonefakeip $1
}
}
alias kickclonefakeip {
if (!%kickclonefakeip) { %kickclonefakeip = 1 }
:loop
if $hget($+(clone.,$1),%kickclonefakeip) {
if ($gettok($hget($+(clone.,$1),%kickclonefakeip),1,32) ison $1) {
kick $1 $hget($+(clone.,$1),%kickclonefakeip) %ver
inc %kickclonefakeip 1
}
else { inc %kickclonefakeip 1 | goto loop }
}
else {
.timerkickcloneFakeip off
unset %kickclonefakeip %numberclone
var %i = 1
if ($hget($+(clone.,$1))) { hfree $+(clone.,$1) }
if $hget($+(ipfake.,$1)) { hfree $+(ipfake.,$1) }
mode $1 -mRx
}
}
#JoinPart1 end

ok it does work but sometime it doesnt work and it just keeping echo the : * /if: '$' unknown operator
can someone please take a look at this and tell me what's wrong with this thanks

#17841 02/04/03 04:03 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
the "if: '$' unknown operator" is, to my knowledge, letting you know thereis a alias thats hasen't been declaired being called. Look around that line for maybe a $alias() that doesn't exist, or maybe confused a var prefix (%) with the alias prefix ($)..

Just a guess.

Also on a side note to those who seem to like to critique, I haven't tries running it so please, no need for the attitudes...


-KingTomato
#17842 02/04/03 05:43 PM
Joined: Feb 2003
Posts: 47
G
Ameglian cow
Offline
Ameglian cow
G
Joined: Feb 2003
Posts: 47
Code:
alias kickuser1 {
  if (%tmpusers == $null) { %tmpusers = 1 }
  :loop
  if $ulist(*,$2,%tmpusers) {

    ; what's this else part doing here? :)
    else { %thenumclones = th }

    if ($ulist(*,$2,%tmpusers) ison $1) {
      if (%tmpusers == 1) { %thenumclones = st }
      if (%tmpusers == 2) { %thenumclones = nd }
      if (%tmpusers == 3) { %thenumclones = rd }
      kick $1 $ulist(*,$2,%tmpusers) %tmpusers $+ %thenumclones of $ulist(*,$2,0) %ver
      inc %tmpusers 1
    }
    else { inc %tmpusers 1 | goto loop }
  }
  else {
    stop
    .rlevel clones
    mode $1 -mRx
    unset %tmpusers %thenumclones %shitaddress
  }
}


think there's at least one mistake. (notice the commented line) Might have missed something. Tried several things to reproduce that error u mentioned but couldn't get it (didn't try with your code but just some simple if-statements) so i don't know where to look for the error.


Quote:

ok it does work but sometime it doesnt work and it just keeping echo the : * /if: '$' unknown operator
can someone please take a look at this and tell me what's wrong with this thanks

So after one event or action it keeps saying that? (like in a timer or while loop?)....

Code:
alias kickuser .timerkickuser -m 0 1000 kickuser1 $1 $2  

that line makes a timer-call to the above alias which had that weird "else" statement wondering around.

I'm not putting my money on this but i think it's worth to take a look at smile

#17843 03/04/03 09:58 AM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774

alias kickuser {
...
if ( $ulist(*,$2,%tmpusers) ) {
...
}

try adding ()'s there... just a thought, but it might help, with little testing I made...

//if $nick(#,3) echo stuff $ifmatch
//if ( $nick(#,3) ) echo stuff $ifmatch

the one above says "* /if: 'echo' unknown operator" but the other one works...


Code:
//if ( khaled isgod ) echo yes | else echo no

Link Copied to Clipboard