This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

bad ident...

Old posts that have not been replied to for several years.
Locked
A
AW

bad ident...

Post by AW »

hi, can someone help me to fix this script, when user will join a channel with a bad ident.....i tried my best but no luck... i will appreciate for ur help
thanks

set badidents {
"badident1"
"badident2"
"badident3"
}

bind join - * bad_ident
proc bad_ident {nick uhost hand chan } {
global badidents botnick
if {(![matchattr $hand b]) && ($nick != $botnick)} {
foreach badchange [string tolower $badnicks] {
if {[string match *$badchange* [string tolower $chan]]} {
set reason "bad ident...."
set ident [string range $uhost [expr [string first "!" $uhost]+1] [expr [string last "@" $uhost]-1]]
set banmask "*$ident@*"
putserv "MODE $chan +b $banmask"
putserv "KICK $chan $nick :$reason"
return 0
}
}
}
}

thanks
regards
aw
g
guppy
eggdrop engineer
Posts: 199
Joined: Mon Sep 24, 2001 8:00 pm
Location: Canada
Contact:

Post by guppy »

Code: Select all


set badidents { 
"badident1" 
"badident2" 
"badident3" 
} 

bind join - * bad_ident 

proc bad_ident {nick uhost hand chan } { 
  global badidents
  if {[isbotnick $nick] || [matchattr $hand b]} {
    return 0
  }
  scan $uhost "%\[^@]@%*s" ident
  set ident [string tolower $ident]
  foreach badident [string tolower $badidents] {
    if {$badident == $ident} {
      newchanban $chan *!$badident@* $botnick "bad ident" 60
      putlog "Banning $nick!$uhost on $chan for having a bad ident."
      return 0
    }
  }
}
A
AW

Post by AW »

Thank you so much
Locked