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.

ban on msg

Old posts that have not been replied to for several years.
Locked
g
gasman
Voice
Posts: 10
Joined: Tue Feb 17, 2004 5:09 am
Location: UK

ban on msg

Post by gasman »

Can any help with a script that will ban or kick anyone messaging the bot
with certain exceptions....i think this may be a good script for banning/kicking certain types of part/join spam bots that msge everyone either onjoin or when they connect and for unauthorised attempts to access the bot.

TIA..
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

you need a quality antispam script, for example spambuster
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Hehe. Spamour! :P
Once the game is over, the king and the pawn go back in the same box.
g
gasman
Voice
Posts: 10
Joined: Tue Feb 17, 2004 5:09 am
Location: UK

Post by gasman »

demond ....too complex just something that will kick or ban anyone who messages the bot with the exeption of owner/s
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

I'd code that for you, it's 3 lines only, but I'm currently reconsidering that kind of stuff, I am inclined to think that we should cultivate a reasonable and fair eggdrop usage patterns, so I'd probably no more help implementing tasks that are, IMHO, lame or/and unfair to those less fortunate (for not having ops)
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Spam messages from random bots and drones (whose nicks aren't registered 99.9% of the time) can be avoided by simply using the umode +R on bahamut and mostly other IRCd's. (/mode <yournick> +R) So people with unregistered nicks or unidentified nicks will not be able to message you then and you will get a raw error from the IRCd.

As for mass join clones, fast join/parts aka revolving door try a script I made ago sometime. You can find it on egghelp's TCL archive under the name of "Mass Clone Join/Part and Revolving Door Protection".
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
g
gasman
Voice
Posts: 10
Joined: Tue Feb 17, 2004 5:09 am
Location: UK

Post by gasman »

so its not possible to do just what i asked...i.e. kick/ban anyone msging the bot with the exception of owners...these COULD be spammers but also could be illegal attempts to acces the bot....??
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Something like this should work:

Code: Select all

bind msgm - "*" msg:bot

proc msg:bot {nick uhost hand text} {
 if {![matchattr $hand n] && ![matchattr $hand n $chan]} {
  foreach chan [channels] {
  if {[botisop $chan] && [onchan $nick $chan]} {
   putserv "MODE $chan +b *!*@[lindex [split $uhost @] 1]"
   putserv "KICK $chan $nick :Do not message me in private!"
   }
  }
 }
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
g
gasman
Voice
Posts: 10
Joined: Tue Feb 17, 2004 5:09 am
Location: UK

Post by gasman »

awyeah...i very much appreciate your help in this

i made a XXX.tcl file from your text

now i get Tcl error [msg:bot]: can't read "chan": no such variable

have i missed something?
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Just a little tweak, and here we go... use this:

Code: Select all

bind msgm - "*" msg:bot

proc msg:bot {nick uhost hand text} {
 if {![matchattr $hand n]} {
  foreach chan [channels] {
  if {[botisop $chan] && [onchan $nick $chan]} {
   putserv "MODE $chan +b *!*@[lindex [split $uhost @] 1]"
   putserv "KICK $chan $nick :Do not message me in private!"
   }
  }
 }
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
g
gasman
Voice
Posts: 10
Joined: Tue Feb 17, 2004 5:09 am
Location: UK

Post by gasman »

that seems to be doin it...much appreciated awyeah
Locked