This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

mask to nick?

Help for those learning Tcl or writing their own scripts.
Post Reply
t
topdawg_b
Voice
Posts: 32
Joined: Sun Dec 07, 2008 7:13 pm

mask to nick?

Post by topdawg_b »

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?
User avatar
DarkRaptor
Voice
Posts: 36
Joined: Sat Apr 15, 2006 2:39 am
Location: Trois-Rivières, Qc

Post by DarkRaptor »

Code: Select all

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
Post Reply