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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
scooterh
Voice
Posts: 12 Joined: Fri May 01, 2009 10:32 pm
Post
by scooterh » Sat May 02, 2009 3:40 pm
one last simple question for you.
If someone is opped, will it ignore thier private messages?
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Sat May 02, 2009 3:41 pm
Not like this, it will only ignore users added to the bot.
NML_375
scooterh
Voice
Posts: 12 Joined: Fri May 01, 2009 10:32 pm
Post
by scooterh » Sat May 02, 2009 6:39 pm
if you ever have time u mind tossing something simple to ignore if the are opped at the time of msg or is that something thats alot of code?
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Sat May 02, 2009 9:30 pm
Not that much of a work, I'll have a look at it in a day or so.
NML_375
nml375
Revered One
Posts: 2860 Joined: Fri Aug 04, 2006 2:09 pm
Post
by nml375 » Sun May 03, 2009 11:31 am
Got a first draft..
Since private messages have no channel information, I'm currently making the assumption that being opped in any channel your eggdrop knows off is sufficient to avoid being banned.
Checks for a single channel, or a set of channels could be accomplished as well, with some additional coding. Using undernet's Cservice banlists would also require information on what channels to apply the ban on, so I'm sticking with eggdrop's internal banlist for now.
Code: Select all
bind msgm - * msgmDoBan
proc msgmDoBan {nick host handle text} {
if {[matchattr "ofvb|ofv" $handle] || [isop $nick]} {
return 1
}
newban [maskhost "${nick}!${host}"] $::botnick "Automated Ban: Do not msg bots" 0
return 0
}
NML_375
Ashoq
Voice
Posts: 11 Joined: Sat Jul 17, 2010 4:35 pm
Post
by Ashoq » Fri Jul 23, 2010 4:57 pm
nice
its works !
but ! how can i !unban (cuse it bans again
)
how can u ban $address like *!*@host.org
thnks
username
Op
Posts: 196 Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:
Post
by username » Fri Jul 23, 2010 11:40 pm
Ashoq wrote: ...
how can u ban $address like *!*@host.org
...
Change
Code: Select all
newban [maskhost "${nick}!${host}"] $::botnick "Automated Ban: Do not msg bots" 0
to
Code: Select all
newban *!*@[lindex [split ${host} "@"] 1] $::botnick "Automated Ban: Do not msg bots" 0
In $uhost you get adress like *!ident@host and you need to split it by "@" into two parts and add "*!*@" to the second part.