| View previous topic :: View next topic |
| Author |
Message |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat May 23, 2009 7:10 pm Post subject: |
|
|
Then you'll have to live with 9char handles. There should be no problem increasing nick-len however. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
symbian001 Voice
Joined: 17 Jan 2009 Posts: 32
|
Posted: Sat May 23, 2009 7:23 pm Post subject: |
|
|
| BLaCkShaDoW wrote: | Well i think your arhive was compiled with 9 characters.
if you want and can compile the arhive again..get the arhive from geteggdrop.com , then untill you use ./configure , go in the director src using cd src , then pico eggdrop.h and look for set ..handle or NICKMAX 9 then replace the 9 with 12.then type cd .. and compile the egg again and you will have the nick with 12 chars.
well if you cant compile the arhiva again..a solution is to add the user like this : the user is BLaCKShaDoW - > .add op BLaCkShaD
then the host will be *!*@BLaCKShaD.users.undernet.org
then use .delhost BLaCkShaD *!*@BLaCKShaD.users.undernet.org (removes host)
and the use .addhost BLaCkShaD *!*@BlaCKShaDoW.users.undernet.org (adds host)
These are the posibilites  |
So I will use this solution. thank you  |
|
| Back to top |
|
 |
BLaCkShaDoW Op

Joined: 11 Jan 2009 Posts: 115 Location: Romania
|
Posted: Sun May 24, 2009 3:35 am Post subject: |
|
|
your welcome  _________________ BLaCkShaDoW Production @ WwW.TclScripts.Net |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sun May 24, 2009 11:42 am Post subject: |
|
|
| Nathema wrote: | | BlackShadow, did u implement Speechles's suggestions? Many of the people in my channels have [{'s and so do have my bots. If so i'm very interested. |
| BLaCkShaDoW wrote: | yes i did  |
Actually, you did.. and then you didn't... (at least when checking english 1.9 version)
If you have tried to fix any of the issues then you've done it so randomly throughout your script that I finally gave up on my list below. But as you can see for yourself, braces will still cause problems. You aren't well versed in the difference between using strings/lists and their proper commands. You seem to mix and match these. This method won't work as you expect 100% of the time. Braces will cause issues, check for youself. Simply test your script yourself by using braces in your own nickname while using commands on nicknames containing braces. You will definitely see for yourself the flaws all over the place you've left looming. Anyways, see below for just a small sample below: | Code: | proc pub:add {nick host hand chan arg} {
global botnick user
# forgot to [split $arg] - brace problems
set level [lindex $arg 0]
set args [lrange [split $arg] 1 end]
proc pub:addhost {nick host hand chan arg} {
global botnick user
set user [lindex [split $arg] 0]
# forgot to [split $arg] - brace problems
set hosts [lrange $arg 1 end]
proc pub:delhost {nick host hand chan arg} {
global botnick user
set user [lindex [split $arg] 0]
# forgot to [split $arg] - brace problems
set hosts [lrange $arg 1 end]
proc pub:chuser {nick host hand chan arg} {
global botnick user
set user [lindex [split $arg] 0]
# forgot to [split $arg] - brace problems
set chandle [lindex $arg 1]
proc pub:ub {nick host hand chan arg} {
global botnick edu
set ban [lindex [split $arg] 0]
# forgot to [split $arg] - brace problems
set why [lindex $arg 1]
proc pub:d {nick host hand chan arg} {
global botnick edu
set days [lindex [split $arg] 0]
set dnick [lindex [split $arg] 1]
set mask [lindex [split $arg] 1]
# forgot to [split $arg] - brace problems
set reason "[lrange $arg 2 end]"
proc pub:ops {nick uhost hand chan arg} {
global botnick
set arg [split $arg]
# why do you split $nick? braces will now cause problems here.
set nick [split $nick]
set arg [split $arg]
# then you do it again further down...wow
set nick [split $nick]
... too much wrong to keep going ... |
_________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
BLaCkShaDoW Op

Joined: 11 Jan 2009 Posts: 115 Location: Romania
|
Posted: Sun May 24, 2009 11:59 am Post subject: |
|
|
first of all i didnt split here "set level [lindex $arg 0]" because the levels are strict " (only voice , op , senior , admin , manager) so we dont need to split here.
second i split the nick on .o
here we see set arg [split $arg] i split the arg but we have :
if {[llength $arg] == 0} {
set arg $nick
}
and the a user that has in his nick { } does .o nick1 nick2 the bot ops the nicks if they have { } in their nicks because i split the arg but if the nick that has { } in his nick and does the command .o the arg becomes $nick and the but will not op him and that why a split the $nick
And on addhost : the host is standard because it cant have { , ] , the host is *!*@users.undernet.org
here :
-
proc pub:ub {nick host hand chan arg} {
global botnick edu
set ban [lindex [split $arg] 0]
# forgot to [split $arg] - brace problems
set why [lindex $arg 1]
the why doesnt need to be split because the why will be only the word "global"
-
I split when its necesarly. _________________ BLaCkShaDoW Production @ WwW.TclScripts.Net |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sun May 24, 2009 12:15 pm Post subject: |
|
|
Any input coming from raw public binds, needs to be [split] before applying list commands onto it. Otherwise problems will be inherited from any braces already present in the string. Choosing not to fix these shows laziness, all I'm saying. At least test the script yourself using braces in both your nickname and your targets nicknames... You sidestepped this part of my last post, so I stepped back to it... Have you tested the script yourself with braces in this way?
| lazy wrote: | | Code: | proc pub:ub {nick host hand chan arg} {
global botnick edu
set ban [lindex [split $arg] 0]
set why [lindex $arg 1] |
the why doesnt need to be split because the why will be only the word "global" |
... How do you figure it will only be that?... It's public input, they can put anything they want and crash your script. Possibly exploit the bot with injected commands (I haven't checked your coding very deeply.. it's not indented properly and hard as hell to read). But it's fixable, all I'm asking is have you even tested this yourself? _________________ speechles' eggdrop tcl archive
Last edited by speechles on Sun May 24, 2009 12:21 pm; edited 1 time in total |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sun May 24, 2009 12:19 pm Post subject: |
|
|
The point is not the value of level, or that being a "fixed" list, but $arg not being that!
Commands expecting a tcl-list need a fully valid list, not only a part of it, in order to work. Simply stating that the first element will never hold curly braces (or other "odd" characters) won't do you any good. The whole data entity must be a valid list, or commands such as lindex will not be able to index the list properly! Thinking otherwise is foolish, and will result in non-working code, at best...
A good rule of thumb, always treat external data as insecure strings.. If you only knew what kind of damages a single accidental hostmask could cause...
That means, don't use lindex, lrange, linsert, lappend, etc with these data as list input, without first making sure it's a list. Since the data comes from an irc network, expect it not to be a valid tcl-list (average humans are really poor at crafting valid list structures). _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
BLaCkShaDoW Op

Joined: 11 Jan 2009 Posts: 115 Location: Romania
|
Posted: Sun May 24, 2009 12:27 pm Post subject: |
|
|
| Code: |
(19:20) <BLaCkShaDoW> .add op {user}
(19:20) -BlackToolS- Am adaugat user-ul {user} cu host :*!*@{user}.users.undernet.org
(19:20) -BlackToolS- {user} are access de op pe #tcltesting.
(19:20) <@{andreiut}> .o
(19:20) * BlackToolS sets mode: -o {andreiut}
(19:20) <{andreiut}> .o
(19:20) * BlackToolS sets mode: +o {andreiut}
(19:20) <@{andreiut}> .o {andreiut}
(19:20) * BlackToolS sets mode: -o {andreiut}
(19:20) <{andreiut}> .o {andreiut}
(19:20) * BlackToolS sets mode: +o {andreiut}
(19:21) <@{andreiut}> .b *!*@host out
(19:21) * BlackToolS sets mode: +b *!*@host
(19:21) <@{andreiut}> .ub *!*@host
(19:21) * BlackToolS sets mode: -b *!*@host
(19:21) <BLaCkShaDoW> .addowner {andreiut}
(19:21) <BLaCkShaDoW> .del andreiut
(19:22) <@{andreiut}> .h
(19:22) -BlackToolS- NIVEL ACCESS -= OWNER =-
(19:22) -BlackToolS- Poti folosi: .h cmds | .h ban | .h add | .h modif | .h chaninfo | .h module | .h owner |
(19:22) <@{andreiut}> .b *!*@user 25 global
(19:22) * BlackToolS sets mode: +b *!*@user
(19:22) <@{andreiut}> .sb *!*@user
(19:22) -BlackToolS- Ban Local : *!*@user | Setat de : {andreiut} | Motiv : ({andreiut}) 25 global (Nr. Kick 7) | Creat in data de : Sun May 24 18:22:17 2009 | Expira la : Tue May 26 18:22:17 2009
(19:23) <@{andreiut}> .gb *!*@user 25 out !
(19:23) -BlackToolS- Am adaugat ban global pe host :*!*@user pe timp :25 ore
(19:23) <@{andreiut}> .sb *!*@user
(19:23) -BlackToolS- Ban Local : *!*@user | Setat de : {andreiut} | Motiv : ({andreiut}) 25 global (Nr. Kick 7) | Creat in data de : Sun May 24 18:22:17 2009 | Expira la : Tue May 26 18:22:17 2009
(19:23) <@{andreiut}> .sb *!*@user global
(19:23) -BlackToolS- Ban Global : *!*@user | Setat de : {andreiut} | Motiv : ({andreiut}) (GLOBAL) out ! | Creat in data de : Sun May 24 18:22:48 2009 | Expira la : Mon May 25 19:22:48 2009
(19:23) -BlackToolS- Ban Local : *!*@user | Setat de : {andreiut} | Motiv : ({andreiut}) 25 global (Nr. Kick 7) | Creat in data de : Sun May 24 18:22:17 2009 | Expira la : Tue May 26 18:22:17 2009
(19:23) <BLaCkShaDoW> .del {andreiut}
(19:24) <BLaCkShaDoW> .b {andreiut} out !
(19:24) * BlackToolS sets mode: -o+b {andreiut} *!*@AnDrEiUt.users.undernet.org
(19:24) * You were kicked from #tcltesting by BlackToolS (Banned: (BLaCkShaDoW) out ! (Nr. Kick 8))
(19:24) <BLaCkShaDoW> .ub *!*@AnDrEiUt.users.undernet.org
(19:24) * BlackToolS sets mode: -b *!*@AnDrEiUt.users.undernet.org
(19:24) * Joins: {andreiut} (~DxN@AnDrEiUt.users.undernet.org)
(19:24) <BLaCkShaDoW> .addowner {andreiut}
(19:24) -BlackToolS- Am adaugat user-ul {andreiut} cu host :*!*~DxN@AnDrEiUt.users.undernet.org
(19:25) -BlackToolS- {andreiut} are access de OWNER.
(19:25) <BLaCkShaDoW> .addhost {andreiut} *!*@AnDrEiUt.users.undernet.org
(19:25) -BlackToolS- Am adaugat :*!*@AnDrEiUt.users.undernet.org la {andreiut}
(19:25) <BLaCkShaDoW> .delhost {andreiut} *!*~DxN@AnDrEiUt.users.undernet.org
(19:25) -BlackToolS- Am sters host-ul :*!*~DxN@AnDrEiUt.users.undernet.org de la user-ul :{andreiut}
(19:25) <BLaCkShaDoW> .info {andreiut}
(19:25) -BlackToolS- Informatii despre {andreiut}
(19:25) -BlackToolS- Timpul curent : Sun May 24 18:25:18 2009 GMT
(19:25) -BlackToolS- Nivel de access :OWNER
(19:25) -BlackToolS- Ultima oara modificat de :BLaCkShaDoW
(19:25) -BlackToolS- HOSTURI: *!*@AnDrEiUt.users.undernet.org
(19:25) -BlackToolS- Statistici pentru {andreiut} : numar de banuri .dr (0) | numar de banuri .b (0) | numar de banuri .spam (0) | numar de banuri .n (0) | numar de invite .i (0) | numar de banuri .black (0) | numar de kick-uri .w (0) | numar de banuri tip .d (0) | numar de kick-uri .k (0). | numar de banuri .stick (0)
(19:25) -BlackToolS- Ultima oara vazut ONLINE :Nu l-am vazut niciodata pe {andreiut}
|
Seems to be working  _________________ BLaCkShaDoW Production @ WwW.TclScripts.Net |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sun May 24, 2009 12:29 pm Post subject: |
|
|
Yes, since you actually managed to create a valid tcl structure by accident...
How about using {user{ as nickname instead... _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
BLaCkShaDoW Op

Joined: 11 Jan 2009 Posts: 115 Location: Romania
|
Posted: Sun May 24, 2009 12:31 pm Post subject: |
|
|
And the "global" can be used only by owners. And it`s now lazyness but i have tu much work with school , work..
I understand that your advices are in the positive mean..and i will put all with split..but not right now Thanks for your time you spent on BlacKTools  _________________ BLaCkShaDoW Production @ WwW.TclScripts.Net |
|
| Back to top |
|
 |
BLaCkShaDoW Op

Joined: 11 Jan 2009 Posts: 115 Location: Romania
|
Posted: Sun May 24, 2009 12:36 pm Post subject: |
|
|
same thing nml375 it works with {user{ _________________ BLaCkShaDoW Production @ WwW.TclScripts.Net |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sun May 24, 2009 12:49 pm Post subject: |
|
|
It is lazyness..
The flaw is even apparent in your help-command...
Just try ".h {" ..
Also, keep in mind that the tiniest of accidents with hostmasks may result in a random person being seen as someone with elevated privileges (that's why the native msg-interface always requires password verification, and there's no public commands).
And regarding the .o command, that one should work as you indeed use lists and split properly. The problem is there are numerous other commands that sporadically use split without thought...
..such as your .ub command...
Have a go at ".ub {evil!*@*.host.com" .. Perhaps not the most common of banmask, but as {} represent scandinavian characters in some charsets, this would still be a fully applicable ban on many irc networks.. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
BLaCkShaDoW Op

Joined: 11 Jan 2009 Posts: 115 Location: Romania
|
Posted: Sun May 24, 2009 12:53 pm Post subject: |
|
|
i promise..i will split everything today  _________________ BLaCkShaDoW Production @ WwW.TclScripts.Net |
|
| Back to top |
|
 |
Nathema Voice
Joined: 13 May 2009 Posts: 15 Location: The Netherlands
|
Posted: Sun May 24, 2009 5:44 pm Post subject: |
|
|
Blackshadow, started using 1.9 english today.
Changed the standard undernet hostmasks into a call to (i'm on Quakenet):
| Code: | proc gethost {user chan} {
set host "*![getchanhost $user $chan]"
if {[regexp -all {[0-9]} $host] > 0} {
set host [maskhost $host]
}
return $host
}
|
If someone else has a better suggestion, it's welcome.
Keep on the good work, tho i'm interested in the above mentioned changes: I'll keep lurking in this topic for future releases ^^
I found quite some untranslated texts, maybe if u have some extra time left u can look at those! |
|
| Back to top |
|
 |
BLaCkShaDoW Op

Joined: 11 Jan 2009 Posts: 115 Location: Romania
|
Posted: Mon May 25, 2009 6:00 am Post subject: |
|
|
Ok thanks i will see what i can do _________________ BLaCkShaDoW Production @ WwW.TclScripts.Net |
|
| Back to top |
|
 |
|