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.
Old posts that have not been replied to for several years.
DrTongue
Op
Posts: 115 Joined: Sat Jan 26, 2002 8:00 pm
Location: Orlando, Florida
Contact:
Post
by DrTongue » Sun Feb 17, 2002 9:29 am
Is there a .tcl that can make the bot kick and/or ban someone if they private message the bot?
T
TriPpen^KiSs
Post
by TriPpen^KiSs » Sun Feb 24, 2002 3:58 am
Try this
bind msgm - * do_msg_kick
proc do_msg_kick {nick hand chan} {
putserv "KICK $nick :razz:lz don't msg the bot!"
}
It is that easy.. you can edit to make the bot do more
T
TriPpen^KiSs
Post
by TriPpen^KiSs » Sun Feb 24, 2002 3:59 am
bind msgm - * do_msg_kick
proc do_msg_kick {nick hand chan} {
putserv "KICK $nick
on't msg the bot!"
}
Sorry i hate them face things.. they are a waste of time and coding..
Kissmine
Petersen
Owner
Posts: 685 Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK
Post
by Petersen » Sun Feb 24, 2002 12:59 pm
that code is incorrect. wrong number of args declared for the proc, the arg definitions you have declared are wrong anyway (no channel is given in msgm) and invalid use of KICK (ie no channel given to kick from).
DrTongue
Op
Posts: 115 Joined: Sat Jan 26, 2002 8:00 pm
Location: Orlando, Florida
Contact:
Post
by DrTongue » Sun Feb 24, 2002 1:12 pm
Thank you Peterson, and thank you TrIpPen. egghead did find/write a nice little code that works just great.
Oh, and thanks a BUNCH again egghead.
Wcc
Master
Posts: 278 Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:
Post
by Wcc » Mon Feb 25, 2002 12:19 am
Try this (it also won't kick users who msg the bot for ops):
Code: Select all
# Ban the users also?
set msgkick_setting(ban) 0
# Set the kick message here.
set msgkick_setting(kickmsg) "Do not message me."
# Set the ban type here:
# 1 - *!*@host.domain
# 2 - *!user@host.domain
# 3 - nick!*@host.domain
# 4 - nick!user@host.domain
# 5 - *!?user@*.host.domain
set msgkick_setting(bantype) "1"
bind msgm - * msgm:msgkick
proc msgkick_maskban {nick uhost} {
global msgkick_setting
switch -- $msgkick_setting(bantype) {
1 { set ban "*!*@[lindex [split $uhost @] 1]" }
2 { set ban "*!$uhost" }
3 { set ban "$nick!*@[lindex [split $uhost @] 1]" }
4 { set ban "$nick!$uhost" }
5 { set ban "[maskhost $uhost]" }
default { set ban "*!*@[lindex [split $uhost @] 1]" }
}
return $ban
}
proc msgm:msgkick {nick uhost hand text} {
global msgkick_setting
if {[validuser $hand]} { return }
foreach chan [channels] {
if {![botonchan $chan] || ![onchan $nick $chan]} { continue }
if {$msgkick_setting(ban)} { putserv "MODE $chan +b [msgkick_maskban $nick $uhost]" }
putserv "KICK $chan $nick :$msgkick_setting(kickmsg)"
}
}
<font size=-1>[ This Message was edited by: Wcc on 2002-02-24 21:23 ]</font>