I didn't test the code, as stated, but it seemed logical to me. I did take into consideration that nicks invite nicks, not just to channels, I added the string match *#* but didn't add an else (which would have been for nick based invites).
The bots I do run are currently in an RPG, which means any restarts cause penalties, which is why I don't use them to test. I had expected the code to work, but expectations always have a way of not working out in my favor.
We explore.. and you call us criminals. We seek after knowledge.. and you call us criminals. We exist without skin color, without nationality, without religious bias.. and you call us criminals.
bind raw - INVITE show:invite
proc show:invite { nick host key args } {
global botnick si
set nik [lindex [split $nick !] 0]
set host [lindex [split $nick !] 1]
set ban [lindex [split $nick @] 1]
set text [lindex [split $key] 1 end]
putserv "PRIVMSG #cappuccino :INVITE SPAM by\0032 $nik \003\[$host\]: invited to $text"
}
is there a way we can make sure bot bans the inviter on all channels bot has halfOP access or above without the use of internal ban ( i like the channel ops to have the freedom to remove bans at any time ) ( and possibly kick as well if inviter is actually is in channel the eggbot has halfOP and up acces as well )
would it also be possibe to use Spikes way of setting banmasks and stacking bans and ( and kicks if inviter is in common chan )
Two problems:
- the bind raw accepts 3 arguments and you given it 4.
- stop using arg or args as they have a special meaning in TCL, and instead use text, txt or something else to better represent the argument the proc is awaiting.
Give me an example of a raw INVITE output and will help you out with a proper code.
Once the game is over, the king and the pawn go back in the same box.
On Undernet network where i tested an invite the RAW i seen was: INVITE my_name #channel.
If you have mIRC type in status window /debug @raw and a window called @raw should appear. Now ask a friend to invite you to a channel and copy/paste what you get there, maybe on your network you get something different.
Once the game is over, the king and the pawn go back in the same box.
does anyone know how to modify this to get this it to set ban ( for inviter ) on all channels the bot is opped ( and possibly kick inviter if in channel ) and i would prefer a channel ban to allow more freedom for channel ops to remove bans at any time
bind raw - INVITE show:invite
proc show:invite {from key txt} {
# get the nick, user and host
scan $from {%[^!]!%[^@]@%s} nick user host
# loop all channels
foreach chan [channels] {
# if the bot is not channel operator no point into continuing
if {![botisop $chan]} continue
# if the inviter isn't on the channel continue
if {![onchan $nick $chan]} continue
# do the +b and kick?
pushmode $chan +b "*!*@$host"
putkick $chan $nick "Invite spam"
}
}
do what you wanted?
I see previous comments but I don't understand where's the problem with the invite command. mind giving an example?
Once the game is over, the king and the pawn go back in the same box.