egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Eggdrop banlist to Undernet X banlist
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
symbian001
Voice


Joined: 17 Jan 2009
Posts: 32

PostPosted: Sat Jan 17, 2009 3:36 pm    Post subject: Eggdrop banlist to Undernet X banlist Reply with quote

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
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Sat Jan 17, 2009 4:28 pm    Post subject: Reply with quote

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 Wink
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
symbian001
Voice


Joined: 17 Jan 2009
Posts: 32

PostPosted: Sat Jan 17, 2009 4:39 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Sun Jan 18, 2009 1:43 pm    Post subject: Reply with quote

Dont really have time to test this my self, sorry. Confused
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
View user's profile Send private message Send e-mail
symbian001
Voice


Joined: 17 Jan 2009
Posts: 32

PostPosted: Sun Jan 18, 2009 6:54 pm    Post subject: Reply with quote

Thank you very much
i will test it and tell you if it's ok Smile thanks
Back to top
View user's profile Send private message
symbian001
Voice


Joined: 17 Jan 2009
Posts: 32

PostPosted: Sun Jan 18, 2009 7:43 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
symbian001
Voice


Joined: 17 Jan 2009
Posts: 32

PostPosted: Sun Jan 18, 2009 8:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Mon Jan 19, 2009 8:03 pm    Post subject: Reply with quote

Anything in the output of
Code:
.set errorInfo
? Will test it myself, as well Smile see if i find something more.
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
symbian001
Voice


Joined: 17 Jan 2009
Posts: 32

PostPosted: Mon Jan 19, 2009 8:17 pm    Post subject: Reply with quote

Where i put this command ?

.set errorInfo
Back to top
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Mon Jan 19, 2009 10:29 pm    Post subject: Reply with quote

in DCC/telnet with eggdrop Very Happy
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
symbian001
Voice


Joined: 17 Jan 2009
Posts: 32

PostPosted: Tue Jan 20, 2009 9:58 am    Post subject: Reply with quote

TCL_no_TK wrote:
in DCC/telnet with eggdrop Very Happy


I did but : What? You need '.help'
The eggdrop don't know this command
Back to top
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Wed Jan 21, 2009 12:24 am    Post subject: Reply with quote

eggdrop.conf check for
Quote:
unbind dcc n tcl *dcc:tcl
unbind dcc n set *dcc:set
and change the word unbind for bind Razz
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
symbian001
Voice


Joined: 17 Jan 2009
Posts: 32

PostPosted: Wed Jan 21, 2009 10:45 am    Post subject: Reply with quote

Ambiguous command. Confused
Back to top
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Wed Jan 21, 2009 6:50 pm    Post subject: Reply with quote

haha Very Happy 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
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
symbian001
Voice


Joined: 17 Jan 2009
Posts: 32

PostPosted: Wed Jan 21, 2009 6:53 pm    Post subject: Reply with quote

ok thank you Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber