| View previous topic :: View next topic |
| Author |
Message |
Zircon Op
Joined: 21 Aug 2006 Posts: 191 Location: Montreal
|
Posted: Thu Dec 13, 2007 6:48 pm Post subject: |
|
|
nah, i MEANT the flag +h, it s never used and then has no effect
I prefer +h to +f  |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Thu Dec 13, 2007 7:02 pm Post subject: |
|
|
That is beside the obvious point that it is considdered bad coding to use reserved keywords/flags/etc.
You might not use it, neither many others. That still does'nt mean that noone uses it. Also, it has a documented function within eggdrop, causing ambigous function of the flag. If you personally choose to use h in your private scripts is pretty much up to you, but using it in publically posted patches for other scripts is not advisable. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Zircon Op
Joined: 21 Aug 2006 Posts: 191 Location: Montreal
|
Posted: Thu Dec 13, 2007 7:10 pm Post subject: |
|
|
| the situation is that we want to exempt ppl that dont have acces to the bot. The flag +h can have an effect if the users are registered in the bot. Knowing that even if they are registred in the bot, the +h is rarely given, means that we can use it with no bad result....so here it has no effect. And like i said in previous post in this thread, it s not an elegant solution, but, it works. And my point was that in this case +h, or any other flag that wa are sure we wont use for other purpose, is preferable to +f. And yes of course, it s better to use the custom flags if we want to avoid any confusion, but here t doesnt make any difference. +f isnt a custom flag |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu Dec 13, 2007 7:43 pm Post subject: |
|
|
Zircon: you really are not getting it! _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
Zircon Op
Joined: 21 Aug 2006 Posts: 191 Location: Montreal
|
Posted: Thu Dec 13, 2007 7:47 pm Post subject: |
|
|
| Quote: | | Zircon: you're not getting it are you? |
lol.
Did you get that in this situation, it makes no difference ? Did you get that using +h is better that +f ? Read the thread from the beginning, i m sure u ll get my point this time. |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu Dec 13, 2007 11:12 pm Post subject: |
|
|
| nml375 wrote: | | That is beside the obvious point that it is considdered bad coding to use reserved keywords/flags/etc. |
Zircon: You're referred back to the above.
PS: I'm a stickler for correctness.  _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
Zircon Op
Joined: 21 Aug 2006 Posts: 191 Location: Montreal
|
Posted: Fri Dec 14, 2007 2:42 am Post subject: |
|
|
And i refer you back to all the posts i made in this thread  |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Fri Dec 14, 2007 8:36 am Post subject: |
|
|
Zircon: Drop the pride...
You're only making yourself looking even worse a coder by defending the improper use of h.
As said, I could'nt care less if you used h in your private scripts, but please considder using proper coding in code released publicly - Especially when you're making changes to others works.
Also worth noting, the range of flags a-z has some dependancies, such as owners will always have master privileges, masters will always have op privileges, etc... As of recently, op also implies halfop: When this change was introduced in 1.6.16, people who upgraded would see their botnets fall to pieces as there was an "undocumented feature" in the userflag l (would double as botflag l - leaf).
The list of dependancies may be changed from version to version of eggdrop, and who knows, maybe h will imply p in the future? It probably won't, but we can never know for sure. All we do know is that a-z are reserved for internal use, whereas A-Z are free to grab... _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Zircon Op
Joined: 21 Aug 2006 Posts: 191 Location: Montreal
|
Posted: Fri Dec 14, 2007 3:31 pm Post subject: |
|
|
Hello nml375
Me a coder ? of course not. I m far from being of coder, otherwise i would add an exemption list and a real solution to this problem. I m just a user of this script ( that i like ) that care to help some1, when the experienced ppl didnt care, or didnt have time. By the way, i gave the solution that worked for me, and like i said, it s not an elegant solution, but it worked for me. A temporary solution before some1 help us to add an exemption list to this script. Saying that +h isnt good knowing that the proposed flag was +f, isnt relevant in my opinion. Can you say that in this case +h will be a major problem ? You know better that it wont be the case. Dont you agree that in this case +h is better than +f, so we can exempt some ppl from being taken for proxies, but still ban them if they make any other offense ? By the way, i really meant +h in the solution i proposed, coz i wasnt knowing that we can custom other flags, but in this case, it doesnt make a big difference +h/+H. ppl that really care, bring real solutions, or at least they try. Keeping criticising ppl that care to help, isnt very constructive. For sure it makes higher the number of posts, but without a real substance. I m not talkin about you, your posts are relevant, full of real substance, the last thread i have in mind is the one where you had the patience and helped really sydneybabe. But in general, when we focus on the marginal, we lose the fundamental.
By the way, it s not about pride, it just make me laugh ok ok i m out of this thread 
Last edited by Zircon on Fri Dec 14, 2007 4:03 pm; edited 1 time in total |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Fri Dec 14, 2007 3:56 pm Post subject: |
|
|
The issue is that some ppl may ask that eggdrop help-info is stripped of formatting characters (bold, underline, colors), while others may ask it to be left in there. This is exactly what the h-flag is used for, and when used as intended (and it is), would cause ambigious behaviour with your suggested modification. Having f-flag in the list does not cause that issue, since "f" is denoted as "friend" (exempt from various protective countermeasures).
We don't critizise that you used "h", we pointed out that you should use "H" instead. I would call that constructive. We are here to help eachother and share our knowledge, part of that is pointing out when something is done improperly - and how it should be corrected. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Zircon Op
Joined: 21 Aug 2006 Posts: 191 Location: Montreal
|
Posted: Fri Dec 14, 2007 5:30 pm Post subject: |
|
|
| Quote: | | The issue is that some ppl may ask that eggdrop help-info is stripped of formatting characters (bold, underline, colors), while others may ask it to be left in there. This is exactly what the h-flag is used for, and when used as intended (and it is), would cause ambigious behaviour with your suggested modification. Having f-flag in the list does not cause that issue, since "f" is denoted as "friend" (exempt from various protective countermeasures). |
In the situation we are talkin about, we want to exempt ppl that arent users on the bot, so no chance they can have +h flag or any other kind of flags....They arent friends, we just want them to not be banned due to the inaccuracy of some proxies databases. So we want to exempt them only from being takin for proxies, but we still want to ban them if they make any other kind of offense.....so +f isnt good at all ! is +h perfect ? nope, but acceptable in this situation. Is +H better, of course it is, that s what i said in a previous post if you read it.
By the way, i wasnt talkin about you, your posts are relevant, full of real substance, the last thread i have in mind is the one where you had the patience and helped really sydneybabe.
nml375, your knowledge is greater than +h/+H, so since you follow this thread, i m gonna ask you if you can point me an idea or fragments of ideas that i can start with to add an exemption list within this script. |
|
| Back to top |
|
 |
minted Halfop
Joined: 20 Jul 2005 Posts: 64
|
Posted: Fri Dec 14, 2007 5:41 pm Post subject: |
|
|
| Zircon wrote: | | In the situation we are talkin about, we want to exempt ppl that arent users on the bot, so no chance they can have +h flag or any other kind of flags....They arent friends, we just want them to not be banned due to the inaccuracy of some proxies databases. |
but what if somebody wants to exempt a user who IS on the bot. what if that user doesnt want +h enabled. The point being made to you is that there are circumstances where using an uncommon flag as a quick fix when there are proper ways to go about it, is not the best policy. Though your right that +f probably shouldn't be used as it exempts them from all kinds of other stuff, using +h instead isn't much better. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Fri Dec 14, 2007 5:43 pm Post subject: |
|
|
The first question would then be, is the list of exempts masks or "full strings" (will there be any wildcards in the list-entries)?
If you can avoid the use of wildcards, it could easily be facilitated by building a (sorted) tcllist of strings, and then use the optimized lsearch to look for any matching entries in the list.
If you do need wildcards, the standard-approach would be something like this:
| Code: | set exempted-list [list "mask1" \
"mask2" \
...]
...
foreach mask $::exempted-list {
if {[string match -nocase $mask $whattotest]} {
set exempted 1
break
}
}
if {[info exists exempted]} {
#found matching exempt
} {
#No exempts matched
}
|
Keep in mind that this approach will not be very performace-effective, and you should try to keep your exempt-lists as small as possible. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Zircon Op
Joined: 21 Aug 2006 Posts: 191 Location: Montreal
|
Posted: Fri Dec 14, 2007 6:36 pm Post subject: |
|
|
@minted : | Quote: | | is +h perfect ? nope, but acceptable in this situation. Is +H better, of course it is, that s what i said in a previous post if you read it. |
@nml375 : i thought to exempt masks like this :
*!*@41.2??.*
*!*@*.ca
*!*@196.2*
In fact, i want to modify this proc, so it can take in account the exemption list :
| Code: | proc proxy::checkuser {nickname hostname handle channel} {
checkstats $channel
if {[channel get $channel antiproxy] && [botisop $channel] && ![string match *users.quakenet.org* $hostname] && ![matchattr $handle fomn|fomn $channel] && ![isbotnick $nickname]} {
channel set $channel antijoins "[expr [channel get $channel antijoins] + 1]"
regexp {.*\@(.*)} $hostname -> hostname
if [regexp {[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$} $hostname] {
[namespace current]::check $hostname $hostname 1 $nickname $hostname $channel
} else {
dnslookup $hostname [namespace current]::check $nickname $hostname $channel
}
}
} |
|
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Sat Dec 15, 2007 11:18 am Post subject: |
|
|
nml375 has provided you with the tools to do what you want (you do however need to run your excemption list twice if you want to excempt IPs aswell as hostnames)
edit: Scratch that, if a user doesn't have his IP resolved then the hostname wouldn't be looked up anyway.
You should _only_ use IPs for your list and run it in the proc that deals with IP checking (which is not the proc you want to modify) |
|
| Back to top |
|
 |
|
|
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
|
|