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 

mask to nick?

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
topdawg_b
Voice


Joined: 07 Dec 2008
Posts: 32

PostPosted: Fri Dec 19, 2008 9:29 am    Post subject: mask to nick? Reply with quote

Ive been looking through commands and tcl's and I just can't find what I am looking for.

I am looking for a command that will find the nick of someone banned.

when the mode bind is triggered the victim variable is a mask. I want to have the bot message the channel
putserv "privmsg #channel :$nick tried to ban (nick of person being banned)"
how can I make the bot determine the nick of the person being banned?
Back to top
View user's profile Send private message
DarkRaptor
Voice


Joined: 15 Apr 2006
Posts: 36
Location: Trois-Rivières, Qc

PostPosted: Fri Dec 19, 2008 1:28 pm    Post subject: Reply with quote

Code:

bind MODE - +b whoisbanned

proc whoisbanned { nick host hand chan mode target } {
  set bannednick ""
  foreach user [chanlist $chan] {
    if {[string match $target $user![getchanhost $user]]} {
      append bannednick "$user "
    }
  }
  putserv "privmsg $chan :$nick tried to ban $bannednick"
}



not tested
_________________
DarkRaptor @ irc.undernet.org
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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