mIRC Home    About    Download    Register    News    Help

Print Thread
#181375 22/07/07 06:22 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Its not kicking on whois or join...any ideal why?
Code:
 

raw 311:*:{
  if (%name != off) && ($nick !isop #chat) {
    var %a = 1, %b = $numtok($3-,32)
    while %a <= %b {
      if $hget(name,$gettok($3-,%b,32)) {
        ban -ku600 #chat $2 2 14Offensive IrcName Detected
        %a = %b
      }
      inc %a
    }
    return $regsubex($1-,/\b( $+ %name $+ )\b/gi,$str(*,$len(\t)))
  }
  haltdef
}
on *:start:{
  if !$hget(name) { .hmake name 10 }
  if $exists(name.op) { .hload name name.op }
}
on *:exit:{
  .hsave -o name name.op
}
on *:disconnect:{
  .hsave -o name name.op
}



Garou #181386 22/07/07 06:55 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
The only thing that I can see from what you posted, is the fact that, $nick returns $null in a raw event, so your first if statement tries to check $null !isop #chat

RusselB #181389 22/07/07 07:19 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Dunno :P
Maybe I should go back to var instead?

Garou #181390 22/07/07 07:19 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
RusseB is correct, use $2 instead of $nick.

Code:
Raw 311:*: echo 2 -a $2- | halt


Praetorian Madison Staff.OranosChat.com * on ss

$2 returns the nickname
$3 returns the ident/user
$4 returns the address
$6- returns the fullname

A more detailed explanation on Raw events can be found here

SladeKraven #181394 22/07/07 07:34 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Raw 311:*:{
if (%name != off) && ($2 !isop #chat) {


Still not kicking?

Garou #181395 22/07/07 07:45 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
Raw 311:*:{
  if (%name != off) && ($2 !isop #chat) {
    if ($hfind(name,$2)) {
      ban -ku600 #chat $2 2 14Offensive IrcName Detected
    }
  }
  haltdef
}


I don't understand why you are using a loop. There's nothing to really loop through.

SladeKraven #181397 22/07/07 08:01 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Nope...This is what I have so far?

Code:
 

Raw 311:*:{
  if (%name != off) && ($2 !isop #chat) {
    if ($hfind(name,$2)) {
      ban -ku600 #chat $2 2 14Offensive IrcName Detected
    }
  }
  haltdef
}

on *:start:{
  if !$hget(name) { .hmake name 10 }
  if $exists(name.op) { .hload name name.op }
}
on *:exit:{
  .hsave -o name name.op
}
on *:disconnect:{
  .hsave -o name name.op
}
alias name {
  if !$1 { .notice $nick No word specified }
  else { .hadd -m name $2 $iif($hget(name,$2),$false,$true)  }
}


Garou #181398 22/07/07 08:04 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
The above code I pasted works for me when I whois them, they get kicked.

SladeKraven #181399 22/07/07 08:09 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
How do you save your bad names in name.op?
mine are like this on one line:
blowjob
$true
suck
$true

Garou #181400 22/07/07 08:15 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Just simply add them by:

/hadd -m name Nick $true
/hadd -m name AnotherNick $true

I'd save it using the -i switch, you don't have to but it's easier for me to read. Just my preference.

SladeKraven #181401 22/07/07 08:37 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Thx guys.


Link Copied to Clipboard