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.

Eggdrop banlist to Undernet X banlist

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
s
symbian001
Voice
Posts: 32
Joined: Sat Jan 17, 2009 1:13 pm

Eggdrop banlist to Undernet X banlist

Post by symbian001 »

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
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

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.
# 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 :wink:
s
symbian001
Voice
Posts: 32
Joined: Sat Jan 17, 2009 1:13 pm

Post by symbian001 »

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 :)
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

Dont really have time to test this my self, sorry. :?

Code: Select all

# 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*)
Last edited by TCL_no_TK on Thu Jan 22, 2009 2:34 am, edited 1 time in total.
s
symbian001
Voice
Posts: 32
Joined: Sat Jan 17, 2009 1:13 pm

Post by symbian001 »

Thank you very much
i will test it and tell you if it's ok :) thanks
s
symbian001
Voice
Posts: 32
Joined: Sat Jan 17, 2009 1:13 pm

Post by symbian001 »

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 :)
s
symbian001
Voice
Posts: 32
Joined: Sat Jan 17, 2009 1:13 pm

Post by symbian001 »

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...
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

Anything in the output of

Code: Select all

.set errorInfo
? Will test it myself, as well :) see if i find something more.
s
symbian001
Voice
Posts: 32
Joined: Sat Jan 17, 2009 1:13 pm

Post by symbian001 »

Where i put this command ?

.set errorInfo
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

in DCC/telnet with eggdrop :D
s
symbian001
Voice
Posts: 32
Joined: Sat Jan 17, 2009 1:13 pm

Post by symbian001 »

TCL_no_TK wrote:in DCC/telnet with eggdrop :D
I did but : What? You need '.help'
The eggdrop don't know this command
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

eggdrop.conf check for
unbind dcc n tcl *dcc:tcl
unbind dcc n set *dcc:set
and change the word unbind for bind :P
s
symbian001
Voice
Posts: 32
Joined: Sat Jan 17, 2009 1:13 pm

Post by symbian001 »

Ambiguous command. :?
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

haha :D i like it.
Its ok, hopefully something will turn up when i test it. (soon)
:arrow: Will keep u posted if anything dose turn up
s
symbian001
Voice
Posts: 32
Joined: Sat Jan 17, 2009 1:13 pm

Post by symbian001 »

ok thank you :D
Post Reply