egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

badrealname bug
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
greenbear
Owner


Joined: 24 Sep 2001
Posts: 733
Location: Norway

PostPosted: Fri Jul 22, 2005 2:14 pm    Post subject: Re: tcl error Reply with quote

Volume wrote:
Tcl error [badwhois:check]: invalid command name "stripcodes"

upgrade your eggdrop
Back to top
View user's profile Send private message Send e-mail
Volume
Halfop


Joined: 23 May 2003
Posts: 84

PostPosted: Fri Jul 22, 2005 2:15 pm    Post subject: Tcl error [badwhois:check]: invalid command name "strip Reply with quote

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
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Fri Jul 22, 2005 3:00 pm    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message Visit poster's website
CrazyEgg
Halfop


Joined: 28 Jul 2005
Posts: 47

PostPosted: Mon Aug 29, 2005 9:27 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Aug 29, 2005 10:51 am    Post subject: Reply with quote

Read this post first.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Aug 29, 2005 11:03 am    Post subject: Reply with quote

yet another lame script messing up with list operations on string
Back to top
View user's profile Send private message Visit poster's website
CrazyEgg
Halfop


Joined: 28 Jul 2005
Posts: 47

PostPosted: Mon Aug 29, 2005 11:29 am    Post subject: Reply with quote

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:

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
    }
  }
}
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3651
Location: Mint Factory

PostPosted: Mon Aug 29, 2005 4:04 pm    Post subject: Reply with quote

demond : do you mind chosing better words to describe a bug/mistake in coding? [censored] happens, nobody is perfect. Mad 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.
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Aug 29, 2005 5:26 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3651
Location: Mint Factory

PostPosted: Tue Aug 30, 2005 12:48 pm    Post subject: Reply with quote

Right, no problem, appologies accepted. I guess I acted a bit stupid, my appologies for that matter. Confused
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Tue Aug 30, 2005 1:39 pm    Post subject: Reply with quote

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 Razz Very Happy
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
greenbear
Owner


Joined: 24 Sep 2001
Posts: 733
Location: Norway

PostPosted: Tue Aug 30, 2005 1:45 pm    Post subject: Reply with quote

grouphug ?
Back to top
View user's profile Send private message Send e-mail
CrazyEgg
Halfop


Joined: 28 Jul 2005
Posts: 47

PostPosted: Wed Aug 31, 2005 1:59 am    Post subject: Reply with quote

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:

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.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Aug 31, 2005 8:22 am    Post subject: Reply with quote

Replace
Code:
[lindex $txt 3]

with
Code:
[lindex [split $txt] 3]

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
CrazyEgg
Halfop


Joined: 28 Jul 2005
Posts: 47

PostPosted: Wed Aug 31, 2005 12:45 pm    Post subject: Reply with quote

Indeed.
best regards with respect Sir_Fz
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber