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 

protect nicks

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
Pitchat
Op


Joined: 18 Feb 2003
Posts: 122
Location: Hebertville Quebec Canada

PostPosted: Wed Mar 12, 2003 2:13 pm    Post subject: protect nicks Reply with quote

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 Smile


thanks
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Pitchat
Op


Joined: 18 Feb 2003
Posts: 122
Location: Hebertville Quebec Canada

PostPosted: Thu Mar 13, 2003 10:06 pm    Post subject: Reply with quote

i`m trying once again Smile

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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Papillon
Owner


Joined: 15 Feb 2002
Posts: 724
Location: *.no

PostPosted: Fri Mar 14, 2003 3:32 am    Post subject: Reply with quote

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 Smile
_________________
Elen sila l˙menn' omentielvo
Back to top
View user's profile Send private message MSN Messenger
caesar
Mint Rubber


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

PostPosted: Fri Mar 14, 2003 3:49 am    Post subject: Reply with quote

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
View user's profile Send private message
EEggy
Op


Joined: 26 Sep 2002
Posts: 122

PostPosted: Sat Jun 21, 2003 9:40 pm    Post subject: Reply with quote

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


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

PostPosted: Sun Jun 22, 2003 12:31 am    Post subject: Reply with quote

Oups, noticed a bug Smile 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
View user's profile Send private message
EEggy
Op


Joined: 26 Sep 2002
Posts: 122

PostPosted: Sun Jun 22, 2003 1:15 am    Post subject: Reply with quote

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


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

PostPosted: Sun Jun 22, 2003 2:19 am    Post subject: Reply with quote

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. Embarassed 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
View user's profile Send private message
EEggy
Op


Joined: 26 Sep 2002
Posts: 122

PostPosted: Sun Jun 22, 2003 5:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
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