| View previous topic :: View next topic |
| Author |
Message |
symbian001 Voice
Joined: 17 Jan 2009 Posts: 32
|
Posted: Sat Jan 17, 2009 3:36 pm Post subject: Eggdrop banlist to Undernet X banlist |
|
|
Hi guys,
I'm looking for script allowing the eggdrop to put every ban from the ban list to X banlist ( undernet ), because undernet servers don't allow mor than 45 bans. But we can make 300 Bans with X.
Thank you |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Sat Jan 17, 2009 4:28 pm Post subject: |
|
|
There are a few scripts in the TCL Archive http://www.egghelp.org/tclhtml/3478-4-0-0-1-ban-X.htm that allow bans to be done/synced with X. Also its worth mentioning that the following settings in eggdrop.conf relating to ban list's and sizes. | Quote: | # Set here the maximum number of bans you want the bot to set on a channel.
# Eggdrop will not place any more bans if this limit is reached. Undernet
# currently allows 45 bans, IRCnet allows 30, EFnet allows 100, and DALnet
# allows 100.
set max-bans 30
# Set here the maximum number of exempts you want Eggdrop to set on a channel.
# Eggdrop will not place any more exempts if this limit is reached.
set max-exempts 20
# Set here the maximum number of invites you want Eggdrop to set on a channel.
# Eggdrop will not place any more invites if this limit is reached.
set max-invites 20
# There is a global limit for +b/+e/+I modes. This limit should be set to
# the same value as max-bans for networks that do not support +e/+I.
set max-modes 30 | I can not say for sure if the net-type settings will override these settings. However, i set mine a lot higher the IRCd allows so i can store bans on my bot without having to be limited to the amount that can be on the channel at one time. Hint: as long as every ban isn't set on the channel, should be able to get away with it  _________________ TCL the misunderstood |
|
| Back to top |
|
 |
symbian001 Voice
Joined: 17 Jan 2009 Posts: 32
|
Posted: Sat Jan 17, 2009 4:39 pm Post subject: |
|
|
Hi Tcl_No_Tk and thanks for replay.
In the tcl archive there is one script "Xbanpurge.tcl" but this script put x banlist in eggdrop banlist. I'm looking for a script who do the opposite
From eggdrop to X  |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Sun Jan 18, 2009 1:43 pm Post subject: |
|
|
Dont really have time to test this my self, sorry. | Code: | # sbx.tcl by TCL_no_TK
set sbx_version "1.2b"
#
# This script allows eggdrop to add bans from its ban list or a channels ban list.
# Depending on the settings, to X. Runs when eggdrop switches its logs daily.
#
# see http://cservice.undernet.org/docs/xcmds.txt for help when setting the script.
# Usage: (in DCC/telnet)
#
# .chanset <#channel> +sbx-enable - will enable the script on the given channel.
# .chanset <#channel> -sbx-enable - will disable the script.
# .chanset <#channel> sbx-duration <hours> - sets the ban duration, in hours for this channel.
# .chanset <#channel> sbx-level <level> - sets the ban level, for this channel.
# .chanset <#channel> sbx-reason <reason> - sets the ban reason, to use when adding the bans
# to X for this channel.
# internal or server
# 1 = use eggdrop's internal ban list for the channel.
# 2 = use the bans from the channel's ban list. (default)
set sbx_type "2"
# default reason
set sbx_reason "You have been banned from this channel."
proc evnt:sbx {type} {
global sbx_type sbx_reason
putlog "* sbx -- checking ban lists to transfer to X"
foreach chan [channels] {
if {([channel get "$chan" "sbx-enable"]) && ([sbx:xonchan "$chan"])} {
if {($sbx_type == "1")} {
if {([llength [banlist "$chan"]] > 0)} {
foreach b [banlist "$chan"] {
set _syntax "ban $chan [lindex $b 0]"
if {([channel get "$chan" "sbx-duration"] != "")} { append _syntax " [channel get "$chan" "sbx-duration"]" }
if {([channel get "$chan" "sbx-level"] != "")} { append _syntax " [channel get "$chan" "sbx-level"]"}
if {([channel get "$chan" "sbx-reason"] == "")} { append _syntax " $sbx_reason"} else { append _syntax " [channel get "$chan" "sbx-reason"]"}
putserv "PRIVMSG x@channels.undernet.org :$_syntax"
if {[killchanban "$chan" "[lindex $b 0]"]} {continue}
}
}
} else {
if {([llength [chanbans "$chan"]] > 0)} {
foreach b [chanbans "$chan"] {
set _syntax "ban $chan [lindex $b 0]"
if {([channel get "$chan" "sbx-duration"] != "")} { append _syntax " [channel get "$chan" "sbx-duration"]" }
if {([channel get "$chan" "sbx-level"] != "")} { append _syntax " [channel get "$chan" "sbx-level"]"}
if {([channel get "$chan" "sbx-reason"] == "")} { append _syntax " $sbx_reason"} else { append _syntax " [channel get "$chan" "sbx-reason"]"}
putserv "PRIVMSG x@channels.undernet.org :$_syntax"
pushmode $chan -b [lindex $b 0]
continue
}
}
}
}
}; return
}
# used for checking if X is on the channel or not.
proc sbx:xonchan {channel} {
if {([onchan "X" "$channel"])} {
return 1
} else {
return 0
}
}
setudef flag sbx-enable
setudef str sbx-duration
setudef str sbx-reason
setudef str sbx-level
bind evnt - logfile evnt:sbx
putlog "loaded sbx.tcl version $sbx_version by TCL_no_TK"
return |
FIXED
[#1] "no such channel" caused by incorrect 'channel get' usage.
[#2] fixed "killchanban" problem. (thou it still may not remove bans*) _________________ TCL the misunderstood
Last edited by TCL_no_TK on Thu Jan 22, 2009 2:34 am; edited 1 time in total |
|
| Back to top |
|
 |
symbian001 Voice
Joined: 17 Jan 2009 Posts: 32
|
Posted: Sun Jan 18, 2009 6:54 pm Post subject: |
|
|
Thank you very much
i will test it and tell you if it's ok thanks |
|
| Back to top |
|
 |
symbian001 Voice
Joined: 17 Jan 2009 Posts: 32
|
Posted: Sun Jan 18, 2009 7:43 pm Post subject: |
|
|
The script work and I should wait when the eggdrop switches logs file to see if he ban.but It will be nice if the eggdrop can check every X minutes the list ban not added and add them  |
|
| Back to top |
|
 |
symbian001 Voice
Joined: 17 Jan 2009 Posts: 32
|
Posted: Sun Jan 18, 2009 8:01 pm Post subject: |
|
|
Error when switching :
[00:00] <CyberLand`> [00:00] * sbx -- checking ban lists to transfer to X
[00:00] <CyberLand`> [00:00] Tcl error [evnt:sbx]: no such channel record
[00:00] <CyberLand`> [00:00] Switching logfiles... |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Mon Jan 19, 2009 8:03 pm Post subject: |
|
|
Anything in the output of ? Will test it myself, as well see if i find something more. _________________ TCL the misunderstood |
|
| Back to top |
|
 |
symbian001 Voice
Joined: 17 Jan 2009 Posts: 32
|
Posted: Mon Jan 19, 2009 8:17 pm Post subject: |
|
|
Where i put this command ?
.set errorInfo |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Mon Jan 19, 2009 10:29 pm Post subject: |
|
|
in DCC/telnet with eggdrop  _________________ TCL the misunderstood |
|
| Back to top |
|
 |
symbian001 Voice
Joined: 17 Jan 2009 Posts: 32
|
Posted: Tue Jan 20, 2009 9:58 am Post subject: |
|
|
| TCL_no_TK wrote: | in DCC/telnet with eggdrop  |
I did but : What? You need '.help'
The eggdrop don't know this command |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Wed Jan 21, 2009 12:24 am Post subject: |
|
|
eggdrop.conf check for | Quote: | unbind dcc n tcl *dcc:tcl
unbind dcc n set *dcc:set | and change the word unbind for bind  _________________ TCL the misunderstood |
|
| Back to top |
|
 |
symbian001 Voice
Joined: 17 Jan 2009 Posts: 32
|
Posted: Wed Jan 21, 2009 10:45 am Post subject: |
|
|
Ambiguous command.  |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Wed Jan 21, 2009 6:50 pm Post subject: |
|
|
haha i like it.
Its ok, hopefully something will turn up when i test it. (soon)
Will keep u posted if anything dose turn up _________________ TCL the misunderstood |
|
| Back to top |
|
 |
symbian001 Voice
Joined: 17 Jan 2009 Posts: 32
|
Posted: Wed Jan 21, 2009 6:53 pm Post subject: |
|
|
ok thank you  |
|
| Back to top |
|
 |
|