View previous topic :: View next topic |
Author |
Message |
Pitchat Op
Joined: 18 Feb 2003 Posts: 122 Location: Hebertville Quebec Canada
|
Posted: Wed Mar 12, 2003 2:13 pm Post subject: protect nicks |
|
|
Hi , i`d like to know how to make a tcl who will prevent people to join in my channel with a nick who match one of the nicks include in the userlist
(to protect my users nicknames) with a message like you havea protected handle please change nick and rejoin.
i try to do it but i mess up badly so i`m begging here
thanks |
|
Back to top |
|
 |
Pitchat Op
Joined: 18 Feb 2003 Posts: 122 Location: Hebertville Quebec Canada
|
Posted: Thu Mar 13, 2003 10:06 pm Post subject: |
|
|
i`m trying once again
is it possible to make the eggdrop tempban people who join a channel and his nick matches a nick in the userlist of the eggdrop
i.e. to protect in a specified channel the nicknames of the user of the egg
Thanks
Pitchat |
|
Back to top |
|
 |
Papillon Owner

Joined: 15 Feb 2002 Posts: 724 Location: *.no
|
Posted: Fri Mar 14, 2003 3:32 am Post subject: |
|
|
Code: |
set tempbantime 1
bind join - * ban_protectednicks
proc ban_protectednicks {nick host hand chan} {
global botnick tempbantime
if {[validuser $nick]} {
newchanban $chan [maskhost $host] $botnick "Protected nick" $tempbantime
putkick $chan $nick
}
} |
^^untested  _________________ Elen sila lúmenn' omentielvo |
|
Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3740 Location: Mint Factory
|
Posted: Fri Mar 14, 2003 3:49 am Post subject: |
|
|
Code: |
# settings
set friends(list) {foo bar}
set friends(reason) "Protected nick!"
set friends(bantime) 1
# binds
bind join - * friends:join
bind nick * * friends:nick
proc friends:join {nick host hand chan} {
global botnick friends
foreach friend [split [string tolower $friends(list)]] {
if {![string match "$friend" [string tolower $nick]] || [validuser $nick]} { continue }
newchanban $chan [maskhost $host] $botnick "$friends(reason)" $friends(bantime)
putkick $chan $nick
}
}
proc friends:nick {nick uhost hand chan newnick} {
global botnick friends
foreach friend [split [string tolower $friends(list)]] {
if {![string match "$friend" [string tolower $newnick]] || [validuser $newnick]} { continue }
newchanban $chan [maskhost [getchanhost $newnick $chan]]" $botnick "$friends(reason)" $friends(bantime)
putkick $chan $newnick
}
}
|
_________________ Once the game is over, the king and the pawn go back in the same box. |
|
Back to top |
|
 |
EEggy Op
Joined: 26 Sep 2002 Posts: 122
|
Posted: Sat Jun 21, 2003 9:40 pm Post subject: |
|
|
Hi Caesar,
set friends(list) {foo bar}
i was wondering how this will work if let say "foo" is in bots userlist and some user join the channel and not in bots userlist, so bot should kick that user that "foo" is in bots userlist...
right now if "foo" is NOT in bots userlist, and someone use "foo", then it kick/ban
how do i fix this, if person is known to the bot, and some user join the channel or chnage the nick to that bot's known user, and kickban that user...that don't use bot's known users nicks...
advance thanks _________________ EEggy |
|
Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3740 Location: Mint Factory
|
Posted: Sun Jun 22, 2003 12:31 am Post subject: |
|
|
Oups, noticed a bug In the join proc replace from:
Code: |
if {![string match "$friend" [string tolower $nick]] || [validuser $nick]} { continue }
|
to:
Code: |
if {![string match "$friend" [string tolower $nick]] || [validuser $hand]} { continue }
|
Also, in the nick proc replace from:
Code: |
if {![string match "$friend" [string tolower $newnick]] || [validuser $newnick]} { continue }
|
to:
Code: |
if {![string match "$friend" [string tolower $newnick]] || [validuser $newnick]} { continue }
|
and should be working now if someone uses a "protected" nick from the list. _________________ Once the game is over, the king and the pawn go back in the same box. |
|
Back to top |
|
 |
EEggy Op
Joined: 26 Sep 2002 Posts: 122
|
Posted: Sun Jun 22, 2003 1:15 am Post subject: |
|
|
Thanks Caesar!
but the following are the same....
Also, in the nick proc replace from:
Code:
Code: | if {![string match "$friend" [string tolower $newnick]] || [validuser $newnick]} { continue }
|
to:
Code:
Code: | if {![string match "$friend" [string tolower $newnick]] || [validuser $newnick]} { continue }
|
how do i fix this banmask so it can ban in this format, *!*ident@*.aol.com, if server ident is enable or not, like if user has an ident
hello@aol.com or ~hello@aol.com, so in both cases it should ban *!*hello@*.aol.com
Code: | set mask [lindex [split [maskhost [getchanhost $nick $channel]] ~] end] |
thank you _________________ EEggy |
|
Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3740 Location: Mint Factory
|
Posted: Sun Jun 22, 2003 2:19 am Post subject: |
|
|
Oups.. yup.. a bad day.. Replace from:
Code: |
if {![string match "$friend" [string tolower $newnick]] || [validuser $newnick]} { continue }
|
to:
Code: |
if {![string match "$friend" [string tolower $newnick]] || [validuser $hand]} { continue }
|
my appologies for that. The banmask is *!?ident@*.host if you have in the .conf file strict-host set to 1 and *!ident@*.host if is set to 0. _________________ Once the game is over, the king and the pawn go back in the same box. |
|
Back to top |
|
 |
EEggy Op
Joined: 26 Sep 2002 Posts: 122
|
Posted: Sun Jun 22, 2003 5:19 pm Post subject: |
|
|
caesar, thank you so much.
just one last question
newchanban $chan "[maskhost [getchanhost $newnick $chan]]" $botnick "$friends(reason)" $friends(bantime)
is "" are required around the-> "[maskhost [getchanhost $newnick $chan]]" and -> "$friends(reason)"
THANKS again. _________________ EEggy |
|
Back to top |
|
 |
|