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.

Whois ban

Old posts that have not been replied to for several years.
V
Volume
Halfop
Posts: 84
Joined: Fri May 23, 2003 5:08 am

@caesar

Post by Volume »

caesar wrote:replace from:

Code: Select all

bind join - "$badr(chan) *" badrealname:join 
to:

Code: Select all

bind join - * badrealname:join
hello,

what must i do with the ban ?

Code: Select all

newchanban $::badr(chan) "*!*@[lindex [split $arg] 3]" $::botnick $::badr(reason) $::badr(time)
In this line is the ::badr(chan) too.
[12:13:34] <Geist> [12:33] Tcl error [badrealname:check]: invalid channel: #channel
when i will this script in all chans work

sorry for my bad english
User avatar
caesar
Mint Rubber
Posts: 3777
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Oups, sorry, forgot about it :) .. replace from:

Code: Select all

newchanban $::badr(chan) "*!*@[lindex [split $arg] 3]" $::botnick $::badr(reason) $::badr(time)
to:

Code: Select all

newchanban $chan "*!*@[lindex [split $arg] 3]" $::botnick $::badr(reason) $::badr(time)
Once the game is over, the king and the pawn go back in the same box.
V
Volume
Halfop
Posts: 84
Joined: Fri May 23, 2003 5:08 am

@caesar sorry for the disruption but i have find yet a bug

Post by Volume »

caesar wrote:Oups, sorry, forgot about it :) .. replace from:

Code: Select all

newchanban $::badr(chan) "*!*@[lindex [split $arg] 3]" $::botnick $::badr(reason) $::badr(time)
to:

Code: Select all

newchanban $chan "*!*@[lindex [split $arg] 3]" $::botnick $::badr(reason) $::badr(time)
Tcl error [badrealname:check]: can't read "chan": no such variable

@caesar: where is the last bug ? thank you for your many helps ! :D

Code: Select all

# What bad realnames should be banned? 
set badr(list) { 
"*mahoo*" 
"*blowjobs*" 
"*hot?dot*"
} 

# For how many minutes whould you like the ban? 
set badr(time) 60 

# What reason will be used when an person is found using an bad realname? 
set badr(reason) "Ich hab dir doch gesagt: Kein Spam ! ;o" 

# binds # 
bind join - * badrealname:join
bind raw - 311 badrealname:check 

# join # 
proc badrealname:join {nick host hand chan} { 
  if {![validuser $hand] || [strlwr $nick] != [strlwr $::botnick]} { 
    putserv "WHOIS $nick" 
  } 
} 

# check # 
proc badrealname:check {from key arg} { 
  set realname [strlwr [ctrl:filter [string range [lindex [split $arg] end] 1 end]]] 
  foreach bah $::badr(list) { 
    if {![string match $bah $realname]} { 
      continue 
    } 
    newchanban $chan "*!*@[lindex [split $arg] 3]" $::botnick $::badr(reason) $::badr(time)

    break 
  } 
} 

proc ctrl:filter {str} { 
  regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str 
  return $str 
} 

putlog "badrealname.tcl.. loaded." 
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Lol are you guys going for the "longest thread ever" award?
User avatar
caesar
Mint Rubber
Posts: 3777
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I'm so dumb sometimes.. replace the check proc with this one:

Code: Select all

# check #
proc badrealname:check {from key arg} { 
  set realname [strlwr [ctrl:filter [string range [lindex [split $arg] end] 1 end]]]
  foreach bah $::badr(list) {
    if {![string match $bah $realname]} {
      continue
    }
    foreach chan [channels] {
      if {![onchan [lindex $arg 1]]} {
        continue
      }
      newchanban $chan "*!*@[lindex [split $arg] 3]" $::botnick $::badr(reason) $::badr(time)
    }
    break
  }
}
Once the game is over, the king and the pawn go back in the same box.
V
Volume
Halfop
Posts: 84
Joined: Fri May 23, 2003 5:08 am

@caesar

Post by Volume »

good morning :)

First you are not dumb ! You can so good coding.
I´m not a quarter as good.

Second:
The Bot scan not chans ore not ban the user. But its not a bug advice on the partyline.
caesar wrote:I'm so dumb sometimes.. replace the check proc with this one:

Code: Select all

# check #
proc badrealname:check {from key arg} { 
  set realname [strlwr [ctrl:filter [string range [lindex [split $arg] end] 1 end]]]
  foreach bah $::badr(list) {
    if {![string match $bah $realname]} {
      continue
    }
    foreach chan [channels] {
      if {![onchan [lindex $arg 1]]} {
        continue
      }
      newchanban $chan "*!*@[lindex [split $arg] 3]" $::botnick $::badr(reason) $::badr(time)
    }
    break
  }
}

Code: Select all

# What bad realnames should be banned? 
set badr(list) { 
"*mahoo*" 
"*blowjob*" 
"*hot?dot*"
} 

# For how many minutes whould you like the ban? 
set badr(time) 60 

# What reason will be used when an person is found using an bad realname? 
set badr(reason) "Ich hab dir doch gesagt: Kein Spam ! ;o" 

# binds # 
bind join - * badrealname:join
bind raw - 311 badrealname:check 

# join # 
proc badrealname:join {nick host hand chan} { 
  if {![validuser $hand] || [strlwr $nick] != [strlwr $::botnick]} { 
    putserv "WHOIS $nick" 
  } 
} 

# check # 
proc badrealname:check {from key arg} { 
  set realname [strlwr [ctrl:filter [string range [lindex [split $arg] end] 1 end]]] 
  foreach bah $::badr(list) { 
    if {![string match $bah $realname]} { 
      continue 
    } 
    foreach chan [channels] { 
      if {![onchan [lindex $arg 1]]} { 
        continue 
      } 
      newchanban $chan "*!*@[lindex [split $arg] 3]" $::botnick $::badr(reason) $::badr(time) 
    } 
    break 
  } 
} 

proc ctrl:filter {str} { 
  regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str 
  return $str 
} 

putlog "badrealname.tcl.. loaded."
User avatar
caesar
Mint Rubber
Posts: 3777
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Actualy it dose work smoothly and bans corectly as far as I can see in my tests. Please explain what you mean by "The Bot scan not chans ore not ban the user. But its not a bug advice on the partyline." cos I haven't understood a thing.
Once the game is over, the king and the pawn go back in the same box.
V
Volume
Halfop
Posts: 84
Joined: Fri May 23, 2003 5:08 am

@caesar

Post by Volume »

caesar wrote:Actualy it dose work smoothly and bans corectly as far as I can see in my tests. Please explain what you mean by "The Bot scan not chans ore not ban the user. But its not a bug advice on the partyline." cos I haven't understood a thing.
Right :)) this bot have me not baned, because the login have +fmno flag on the chan *G*

Sorry, i have vergotten to change the ident for testing :oops:
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

I bet "not a bug advice on the partyline" meant that there isn't a tcl error shown on the partyline.
V
Volume
Halfop
Posts: 84
Joined: Fri May 23, 2003 5:08 am

@caesar

Post by Volume »

hello caesar,
in the script must be a little bug. capslock names (BIG WORDS) dont get a ban but the script have the badrealname into...

PCorn is -PC0rn@chello062178241113.1.14.vie.surfer.at * I WILL CLEAN HOUSE
PCorn on #schweiz #austria #windows #duesseldorf
PCorn using *.stealth.net [192.168.18.2] Stealth Communications - IPv6, Ne
PCorn End of WHOIS list.

This user dont get ban but the bad realname is in the script!

Problem with this user too:

Warner is -warner@p508C230F.dip.t-dialin.net * HURENSOHN
Warner using uni-karlsruhe.de University of Karlsruhe, Germany
Warner has been idle 4secs, signed on Sun Sep 07 21:04:21
warner End of WHOIS list.
-

i hope you can help me thank you very mutch

Code: Select all

# What bad realnames should be banned?
set badr(list) {
"*mahoo*"
"*blowjob*"
"*hot?dot*"
"*smile*"
"*tricky*"
"*bmw??ever*"
"*URENS*HN*"
"*I WILL CLEAN HOUSE*"
}

# For how many minutes whould you like the ban?
set badr(time) 60

# What reason will be used when an person is found using an bad realname?
set badr(reason) "Mag dich net ciao :)"

# binds #
bind join - * badrealname:join
bind raw - 311 badrealname:check

# join #
proc badrealname:join {nick host hand chan} {
  if {![validuser $hand] || [strlwr $nick] != [strlwr $::botnick]} {
    putserv "WHOIS $nick"
  }
}

# check #
proc badrealname:check {from key arg} {
  set realname [strlwr [ctrl:filter [string range [lindex [split $arg] end] 1 end]]]
  foreach bah $::badr(list) {
    if {![string match $bah $realname]} {
      continue
    }
    foreach chan [channels] {
      if {![onchan [lindex $arg 1]]} {
        continue
      }
      newchanban $chan "*!*@[lindex [split $arg] 3]" $::botnick $::badr(reason) $::badr(time)
    }
    break
  }
}

proc ctrl:filter {str} {
  regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str
  return $str
}

putlog "badrealname.tcl.. loaded."
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

use the -nocase option with 'string match'
V
Volume
Halfop
Posts: 84
Joined: Fri May 23, 2003 5:08 am

Post by Volume »

user wrote:use the -nocase option with 'string match'
sorry , but my tcl is not so good !
i cant change it.
can somebody help me ?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

set realname [strlwr [ctrl:filter [string range [lindex [split $arg] end] 1 end]]]
that means the bot see all realnames as lower-case (even if they have capital letters)

so:
set badr(list) {
"*mahoo*"
"*blowjob*"
"*hot?dot*"
"*smile*"
"*tricky*"
"*bmw??ever*"
"*URENS*HN*"
"*I WILL CLEAN HOUSE*"
}
shoud be all in lower-case letters (it doesn't matter if someone puts capital letters)
=> "*URENS*HN*" and "*I WILL CLEAN HOUSE*" should be "*urens*hn*" and "*i will clean house*"

also what user meant is replace:

Code: Select all

if {![string match $bah $realname]} {
with

Code: Select all

if {![string match -nocase $bah $realname]} {
Locked