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.

badrealname bug

Support & discussion of released scripts, and announcements of new releases.
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Re: tcl error

Post by greenbear »

Volume wrote:Tcl error [badwhois:check]: invalid command name "stripcodes"
upgrade your eggdrop
V
Volume
Halfop
Posts: 84
Joined: Fri May 23, 2003 5:08 am

Tcl error [badwhois:check]: invalid command name "strip

Post by Volume »

i have found the problem
Tcl error [badwhois:check]: invalid command name "stripcodes"

## ¤ BadWhois
# version 0.1
# caesar <cezarica [at] prietenii [dot] com>
# #eggdrop @ Undernet.org
# http://www.r0x0ring.com/


eggdrop version 1.6.15

ok update to 1.6.17 ...
Last edited by Volume on Fri Jul 22, 2005 3:04 pm, edited 2 times in total.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

it migth be wiser to use WHO instead of WHOIS, a lot less of server reply, with the same effect (obtaining realname/gecos info) => less chance of flooding out (or rather flooding in)
C
CrazyEgg
Halfop
Posts: 47
Joined: Thu Jul 28, 2005 4:02 pm

Post by CrazyEgg »

ozqfbbjp is ~zfinzbq@207.5.200.227 * yehmyap {gjo{cr xqjbpxm

Tcl error [badwhois:check]: unmatched open brace in list

using:
## ¤ BadWhois
# version 0.1

any suggestion?
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Read this post first.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

yet another lame script messing up with list operations on string
C
CrazyEgg
Halfop
Posts: 47
Joined: Thu Jul 28, 2005 4:02 pm

Post by CrazyEgg »

Currently: unmatched open brace in list
Currently: while executing
Currently: "lindex $txt 3"
Currently: (procedure "badwhois:check" line 12)
Currently: invoked from within
Currently: "badwhois:check $_raw1 $_raw2 $_raw3"

Code: Select all

set bwhois(list) {
" "
"????? ????? ?????"
"?????? ?????? ??????"
"??????? ??????? ???????"
"???????? ???????? ????????"
"????????? ????????? ?????????"
"????? ?????"
"?????? ??????"
"??????? ???????"
"???????? ????????"
"????????? ?????????"
}

.................................................
proc badwhois:check {from key txt} {
  global bwhois
  if {![info exists bwhois(whois)]} {
    set bwhois(whois) ""
  }
  if {[isbotnick [set nick [lindex [split $txt] 1]]] || [validuser [nick2hand $nick]]} {
    return
  }
  set realname [stripcodes bcruag [string range [join [lrange [split $txt] 5 end]] 1 end]]
  foreach bla $bwhois(list) {
    if {[string match -nocase $bla $realname]} {
      set position [lsearch $bwhois(whois) "*:[set mask *!*@[lindex $txt 3]]*"]
      if {[botisop [set chan [lindex [set t [split [lindex $bwhois(whois) $position] :]] 1]]]} {
        putquick "KICK $chan $nick :[lindex $bwhois(br) 0]" -next
      }
      newchanban $chan [lindex $t 2] BadWhois [lindex $bwhois(bc) 0] [lindex $bwhois(bc) 1]
      set bwhois(whois) [lreplace $bwhois(whois) $position $position]
      break
    }
  }
}
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

demond : do you mind chosing better words to describe a bug/mistake in coding? [censored] happens, nobody is perfect. :x Dont just go insulting people..

'WHO instead of WHOIS" it's a good ideea but the whole purpose of this script was (at least in the first place) to check user's 'realname' upon joining a specific channel and ban them when matches something from a specific list of banned realnames.

Sir_Fz : either reply with a proper answer or don't reply at all.

CrazyEgg : Don't you see the e-mail in the header? Why don't you contact the author and tell him he is a dumb ass? his scripts suck or whatever you wish.. it's called FEEDBACK this days. Anyway, start a new topic (only AFTER you have contacted the author and told him/her a pice of your mind), not that I want to hide myself from the fact that sometimes I screw up things.

My bad, my bad.. I should have mentioned in the header that this script needs eggdrop 1.6.17 since the "stripcodes" was just added in.

Anyway, I'll try to fix it in a couple of days, curently I'm busy with school. I got some exams so I won't neither time or mood to fix it. So you can do like all the other people do, unload the script and don't give any feedbacks to the author letting him/her know your opinion on it's/her work and pick another one from the TCL Archive or pay for/ask someone/do yourself another one.

Edit: After my post I was contacted on IRC by CrazyEgg and told him how to fix stuff. After all, as I was expecting it's a user side characters, not a problem in the script.
Once the game is over, the king and the pawn go back in the same box.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

correction: lame is that particular instance of handling particular string, not the whole script; I agree that judging the whole script (which I haven't seen) was unfair

and apologies to whomever feels offended by the adj. "lame"; I, for one, don't feel offended when someone points out lame parts of my code (surprisingly as it may seem, there are some of those, in spambuster in particular)

in essence, if you are a lamer it's guranteed that what you do is lame; however, the reverse is not necessarily true - doing lame things every now and then doesn't mean you are a lamer, and you shouldn't feel offended
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Right, no problem, appologies accepted. I guess I acted a bit stupid, my appologies for that matter. :?
Once the game is over, the king and the pawn go back in the same box.
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

caesar wrote:Sir_Fz : either reply with a proper answer or don't reply at all.
I dont know why you got so emotional and even tried to drop this on me, as far as I know my reply was pretty helpful (at least for me) because now I know what needs to be fixed in particular rather than searching where the error might be. Anyway, I forgive you :P :D
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

grouphug ?
C
CrazyEgg
Halfop
Posts: 47
Joined: Thu Jul 28, 2005 4:02 pm

Post by CrazyEgg »

sir_fiz it was my mistake and your post was properly indeed.

after the discution with ceasar on irc and after reading http://www.peterre.com/characters.html i didnt find the correct solution yet.

i add to the

Code: Select all

set bwhois(list) {
...........
"*\}*"
"*\{*"
}
This is not the correct solution.That option ban every user with special character in fullname and not make the correct detection as i want.
(ban full name like that: -------{----@)
Still looking to find out the correct settings with filter.
i repeat the problem:
user have fullname like that:
eyhsdbfo djfoks{k sbdjfnsu (3 words with 8 characters each one)
arg to detect is:"???????? ???????? ????????"
P.S.: the character "{" has no standar position on users fullname.
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Replace

Code: Select all

[lindex $txt 3]
with

Code: Select all

[lindex [split $txt] 3]
C
CrazyEgg
Halfop
Posts: 47
Joined: Thu Jul 28, 2005 4:02 pm

Post by CrazyEgg »

Indeed.
best regards with respect Sir_Fz
Post Reply