| View previous topic :: View next topic |
| Author |
Message |
Riddler Halfop
Joined: 20 May 2007 Posts: 60 Location: Brasov, Romania
|
Posted: Thu Jun 14, 2007 11:00 pm Post subject: [SOLVED] Question about the bantype "BLACKLIST" |
|
|
Hello guys, I have a little question ... I want to make a blacklist ban command ( someting like .black <nick | *!*@host> [reason] ) and I don`t know what eggdrop command to use...
or
| Quote: | | newchanban (without setting a ban time) |
the result will be something like this:
| Quote: | <me> .black *!*test*@*
* |Eggdrop sets mode: +b *!*test*@*
<me> .iban *!*test*@*
-|Eggdrop- Ban INFO: *!*test*@* , Expire: 0 seconds , (me) (BLACKLIST) Banned!
-|Eggdrop- End Ban-INFO searching ... |
this is just an example .... I`m saw this type of command on a channel... its a interesting command...the ban will never expire from the bots internal banlist .....all I need to know is what type of command to use so that example will work...
any hints.. ?  _________________ I am a man of few words, but many riddles
Last edited by Riddler on Sat Nov 28, 2009 8:10 pm; edited 2 times in total |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Fri Jun 15, 2007 9:03 am Post subject: |
|
|
Read about [newban] and [newchanban] in Tcl-commands.doc (in your eggdrop's /doc directory). One is for global bans and the other is for channel-specific bans. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Sat Jun 16, 2007 4:08 am Post subject: |
|
|
| Code: | # What Channels should I work on? Ex. #octagon #eggdrop
# Leave empty to enable on all channels the bot is on.
set lmrchn ""
# How long (in minutes) do you want to ban offender(s)
# (default 2)
set lmrbt "2880"
# Flags of users who are protected (default "bomn|omn")
set lmrflg "bomnf|omnfE"
# Kick-Reason
set lmrrsn "Blacklist host, you may take a deep breath.!"
# Announce Cleanup in the channel? (default 0)
set lmrtlk "0"
# And what do we want to tell them?
# Note: Announce must be 1 for this.
set lmrtxt "Processing..."
# Enable logging? (default 0)
set lmrlog "0"
## End of the configuration. ##
set lmr(version) "V1.6"
set lmr(rdate) "Sat 01 Dec 01"
bind pub m|E !loser lmr:kb
proc lmr:kb {nick uhost hand chan who} {
global lmrbt lmrchn lmrflg lmrrsn lmrtlk lmrtxt lmrlog botnick
if {(($lmrchn == "") || ([lsearch -exact $lmrchn [string tolower $chan]] != -1)) } {
if {[botisop $chan] && [isvoice $nick $chan]} {
if { $who != "" } {
if { $lmrtlk == "1" } { putserv "PRIVMSG $chan $lmrtxt" -next}
foreach targets $who {
set bwho [nick2hand $targets $chan]
set bmatch [matchattr $bwho $lmrflg $chan]
set bonchan [onchan $targets $chan]
if { [string tolower $targets] != [string tolower $botnick] && $bmatch != "1" && $bonchan == "1" } {
if { $lmrtlk == "1" } { putserv "PRIVMSG $chan $lmrtxt" -next; incr lmrtlk}
set bhost [getchanhost $targets $chan]
set banmask "*!*@[lindex [split $bhost @] 1]"
putserv "MODE $chan +b $banmask"
newchanban $chan $banmask $nick $lmrrsn $lmrbt
putkick $chan $targets $lmrrsn
}
}
if { $lmrtlk >= "1" } { set lmrtlk "1" }
if { $lmrlog == "1" } { putlog "LMR: called by $nick ($hand) on $chan. ($who)" }
}
}
}
}
putlog "LMR: Lamer.tcl $lmr(version) - $lmr(rdate) by acenoid (ace@clan-octagon.de) loaded sucessfully." |
I don't know who wrote this tcl and when did he write it.. But I have modified this TCL and giving it you not under my name. The owner is different I simply modified it to be used on my purposes. Anyway it is a nice blacklisting TCL, you may change it on your way.
Thanks
iamdeath _________________ |AmDeAtH @ Undernet
Death is only the *Beginning*... |
|
| Back to top |
|
 |
Zircon Op
Joined: 21 Aug 2006 Posts: 191 Location: Montreal
|
|
| Back to top |
|
 |
Riddler Halfop
Joined: 20 May 2007 Posts: 60 Location: Brasov, Romania
|
Posted: Sat Jun 16, 2007 6:31 pm Post subject: |
|
|
| Sir_Fz wrote: | | Read about [newban] and [newchanban] in Tcl-commands.doc (in your eggdrop's /doc directory). One is for global bans and the other is for channel-specific bans. |
Ok...so here is are the commands.
| Quote: | newchanban <channel> <ban> <creator> <comment> [lifetime] [options]
Description: adds a ban to the ban list of a channel; creator is given
credit for the ban in the ban list. lifetime is specified in
minutes. If lifetime is not specified, ban-time (usually 60) is
used. Setting the lifetime to 0 makes it a permanent ban.
Options:
sticky: forces the ban to be always active on a channel, even
with dynamicbans on
none: no effect
Returns: nothing
Module: channels |
| Quote: | newban <ban> <creator> <comment> [lifetime] [options]
Description: adds a ban to the global ban list (which takes effect on
all channels); creator is given credit for the ban in the ban list.
lifetime is specified in minutes. If lifetime is not specified,
global-ban-time (usually 60) is used. Setting the lifetime to 0 makes
it a permanent ban.
Options:
sticky: forces the ban to be always active on a channel, even
with dynamicbans on
none: no effect
Returns: nothing
Module: channels |
--------------
| iamdeath wrote: | I don't know who wrote this tcl and when did he write it.. But I have modified this TCL and giving it you not under my name. The owner is different I simply modified it to be used on my purposes. Anyway it is a nice blacklisting TCL, you may change it on your way.
Thanks
iamdeath |
interesting script....I`ll give it a try but ..
| Quote: | # How long (in minutes) do you want to ban offender(s)
# (default 2)
set lmrbt "2880" |
| Quote: | | newchanban $chan $banmask $nick $lmrrsn $lmrbt |
It has a bantime in the command...and this means that after 48 hours that ban will expire...so not what I`m looking for ...
OK... so now let`s try to make the command work.. _________________ I am a man of few words, but many riddles |
|
| Back to top |
|
 |
Riddler Halfop
Joined: 20 May 2007 Posts: 60 Location: Brasov, Romania
|
Posted: Sat Jun 16, 2007 7:07 pm Post subject: |
|
|
OK..
So I`ve added this code for the blacklist-ban:
| Quote: | | newchanban $chan $blhost blacklist "($hand) (BLACKLISTED) $reason" 0 |
and
| Quote: | | newignore $blhost blacklist "($hand) (BLACKLISTED) $reason" 0 |
and when I`ve tested the script, the results are:
| Quote: | <@me> .black *!*@127.0.0.0 lol
* |Learn sets mode: +b *!*@127.0.0.0
<@me> .findban *!*@127.0.0.0
-|Learn- Ban INFO: *!*@127.0.0.0 , Expire: 0 seconds , (me) (BLACKLISTED) lol
-|Learn- End Ban-INFO searching ...
----
<me> .ignore
<|Learn> [00:51] #me# ignores
<|Learn> Currently ignoring:
<|Learn> [ 1] *!*@127.0.0.0 (perm)
<|Learn> ban: (me) (BLACKLISTED) lol
<|Learn> Started 00:42
---
<@me> .unban *!*@127.0.0.0
* X sets mode: -b *!*@127.0.0.0
<me> .findban *!*@127.0.0.0
-|Learn- End Ban-INFO searching ... |
This is just what I was looking for
Thanks Sir_Fz  _________________ I am a man of few words, but many riddles |
|
| Back to top |
|
 |
|