| View previous topic :: View next topic |
| Author |
Message |
diMension Voice
Joined: 23 Mar 2007 Posts: 11
|
Posted: Fri Mar 23, 2007 11:04 pm Post subject: Adding Users - Host Mask - Flags |
|
|
Hello, my name is "diMension". First off, let me tell you that the eggdrop is a sweet bot and nothing else is better . Lets get down to business.
1) Adding Users - Limit on how long name can be.
2) Host Mask - For bans.
3) The flag +a - Auto-Opping.
1 - My first question is, how do i get the eggdrop to accept a longer "HANDLE"
i have a tcl script that binds
~addowner to adding the +n flag in the given channel. I don't feel like posting code, but i can sum it up.
***************EDIT - after reading some other tcl helps, i'm going to paste all of the code.
| Code: |
bind pub n ~addowner add_owner_chan
proc add_owner_chan {n u h c a} {
global botnick
if {[lindex $a 0] == ""} {
putquick "NOTICE $n : ~addowner <nick>"
return 0
}
set newop [lindex $a 0]
set newhost [maskhost [getchanhost $newop $c]]
if {[finduser $newhost] != "*"} {
putserv "NOTICE $n :$newop\[$newhost\] is known as user [finduser $newhost]"
return 1
}
adduser $newop $newhost
chattr $newop +n $c
putserv "NOTICE $n :$newop\[$newhost\] has been added in $c as owner"
putserv "NOTICE $newop :$n has added you in $c as owner"
save
}
|
I also use this code to addpeon/addops (auto) - Because i run a club or 3 and i want them to get auto-peon'd or auto-op'd without actually having "ACCESS" to the bot, and i can't addpeon them publicly if there name is too big.
Now, this code WORKS. I have TESTED It, it works fine. But the issue i am having is, if then nick of the person is "iloveggysWOO" Well, the eggdrop will add "iloveegg" to the "handle" part, and when i do "chattr $newop" it is "chattr $iloveeggyswOO" instead of "iloveegg".
Any way i can get the eggy to accept larger "handles" in its user database? Thanks.
2 - The hostmask that "comes with the bot" is *!ident@host.com - I am on a network that allows +x - So obviously, this hostmask is easily ban evadable. I need a hostmask that is *!*@host.com - How can i do this? - It will be easier and more secure when i add users to the bot using the pub command
3 - The +a flag doesn't work for some reason, i had to bind a join event
And YES , i had +autoop set in the channel
| Code: |
bind join a|a * op_chan
proc op_chan {nick uhost hand chan} {
if {[matchattr $hand -]} {putserv "MODE $chan +o $nick"}
return 1
}
|
|
|
| Back to top |
|
 |
Callisto Halfop
Joined: 13 Mar 2005 Posts: 86
|
Posted: Sat Mar 24, 2007 3:15 am Post subject: |
|
|
you need to edit the eggdrop.h file (usually eggdropx.x.xx/src/eggdrop.h)
Line 63 - change to read
#define HANDLEN 32 /* valid values 9->NICKMAX */
Then recompile the bot and restart
as for your other questions, sorry a bit beyond my abilities |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Sat Mar 24, 2007 7:37 am Post subject: |
|
|
To change host to *!*@host.here modify these lines:
Original:
| Code: | set newop [lindex $a 0]
set newhost [maskhost [getchanhost $newop $c]] |
To:
| Code: | set newop [lindex $a 0]
set newhosts [getchanhost $newop $c]
set newhost "*!*@[lindex [split $newhost @] 1]" |
|
|
| Back to top |
|
 |
diMension Voice
Joined: 23 Mar 2007 Posts: 11
|
Posted: Sat Mar 24, 2007 2:04 pm Post subject: |
|
|
Thanks guys
| Code: |
set newop [lindex $a 0]
set newhosts [getchanhost $newop $c]
set newhost "*!*@[lindex [split $newhost @] 1]"
|
set newhost "*!*@[lindex [split $newhost @] 1]"
shouldnt the $newhost be $newhosts
Last edited by diMension on Sat Mar 24, 2007 5:56 pm; edited 1 time in total |
|
| Back to top |
|
 |
diMension Voice
Joined: 23 Mar 2007 Posts: 11
|
Posted: Sat Mar 24, 2007 5:37 pm Post subject: |
|
|
| Callisto wrote: | you need to edit the eggdrop.h file (usually eggdropx.x.xx/src/eggdrop.h)
Line 63 - change to read
#define HANDLEN 32 /* valid values 9->NICKMAX */
Then recompile the bot and restart
as for your other questions, sorry a bit beyond my abilities |
i dont have that file...
im using a windrop if that helps |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Sat Mar 24, 2007 7:52 pm Post subject: |
|
|
use this:
| Code: | set newop [lindex $a 0]
set newhosts [getchanhost $newop $c]
set newhost "*!*@[lindex [split $newhosts @] 1]" |
|
|
| Back to top |
|
 |
diMension Voice
Joined: 23 Mar 2007 Posts: 11
|
Posted: Sat Mar 24, 2007 8:05 pm Post subject: |
|
|
yea thanks i got it
<3 to da max |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Mar 24, 2007 9:49 pm Post subject: |
|
|
You shouldn't use list commands on strings, [split] $a before applying [lindex] on it. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Callisto Halfop
Joined: 13 Mar 2005 Posts: 86
|
Posted: Sun Mar 25, 2007 4:02 am Post subject: |
|
|
| diMension wrote: | | Callisto wrote: | you need to edit the eggdrop.h file (usually eggdropx.x.xx/src/eggdrop.h)
Line 63 - change to read
#define HANDLEN 32 /* valid values 9->NICKMAX */
Then recompile the bot and restart
as for your other questions, sorry a bit beyond my abilities |
i dont have that file...
im using a windrop if that helps |
Isnt there a windrop just for extended handle length?
| Quote: | Eggdrop v1.6.18 Handlen32 (12.08.2006)
For networks which allow nicknames long than 9 characters in length (e.g. DALnet, QuakeNet) |
http://windrop.sourceforge.net/downloads.html
there we go google is our friend |
|
| Back to top |
|
 |
|