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.

quitban.tcl v.1.1 slennox

Old posts that have not been replied to for several years.
Locked
A
Ahilius
Voice
Posts: 1
Joined: Sat Aug 14, 2004 10:11 pm

quitban.tcl v.1.1 slennox

Post by Ahilius »

In your collection of tcl scripts, you have quitban.tcl script (v1.1).

I've been using this script for a while on my channel (#Liepaja).
Wonderful script!

Only one but. Script setting ban in bot's banist and in channel banlist.

(06:30:30)—› quit: (quit_ban_test) (~user@proxy2.vita.gov.lv) (Quit: HnH Script version 5.2 Download
from www.RG-soft.com)
(06:30:30)—› mode: (Liepaja) sets (+b *!~user@proxy2.vita.gov.lv)

Every day I need to clean my channel banlist :( because it becoming a
mess :(

Can script be configured to set ban into bot's banlist only?


Thank you for your answer!

Sincerly,

Andry
P.S. - sorry for bad english... :)
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Umm, maybe you can replace the 'newchanban' to putserv "MODE $chan +b $banmask" something like this. :mrgreen:

I also made a script similar it binds on part as well as quit you might want to try that 'Anti Part/Quit Message Script'. You can find it on egghelp.org's TCL archive.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Also set +dynamicbans :)
# dynamicbans
# Only activate bans on the channel when necessary? This keeps
# the channel's ban list from getting excessively long. The bot
# still remembers every ban, but it only activates a ban on the
# channel when it sees someone join who matches that ban.
#
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Alchera wrote:Also set +dynamicbans :)
# dynamicbans
# Only activate bans on the channel when necessary? This keeps
# the channel's ban list from getting excessively long. The bot
# still remembers every ban, but it only activates a ban on the
# channel when it sees someone join who matches that ban.
#
Yes! it is also good, to set +dynamicbans.
Bans in the bots banlist will not be always enforced/active on the channel if those bans are unbanned on the channel by an Op. :mrgreen:
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
m
mm
Halfop
Posts: 78
Joined: Thu Jul 01, 2004 10:24 pm

Post by mm »

hi awyeah,

nice script, but i think ppl will get the error... because there is no -> ctrl:filter procedure in the code...may be i am missing something..


thanks
MM
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Example for calling:

Code: Select all

set msg [ctrl:filter $arg]
The procedure itself:

Code: Select all

# ctrl:filter <string> 
# Strip all control characters. Thanks to ppslim (ppslim@acarr.plus.com).

proc ctrl:filter {str} { 
  regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str 
  return $str 
}
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

There is a filter, actually in some procs I forgot to rename it.
That's why the named filter in the procs is different to the actual name of the filter giving an error that procedure cannot be found.

What can I say! A 50kb+ script, somewhere you get an error! isn't it true?
Maybe because of being lazy and pasting ;) and also not of thorough testing!

Anyway I just submitted a new fixed version, with more updates and functions of the 'Anti Part/Quit Message Script'. :wink:

It takes some days to be added onto egghelp.org though. If you need the script in a hurry give me your email and I will send it to you, otherwise wait till it has been updated on egghelp.org's TCL archive in the 'New Scripts' section! :mrgreen:

I will be looking in the future to reduce the size when I get time as well and add a bit more features! :P
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

/me smacks awyeah on the wrist :mrgreen:
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

By the way as for this code:
Alchera wrote:Example for calling:

Code: Select all

set msg [ctrl:filter $arg]
The procedure itself:

Code: Select all

# ctrl:filter <string> 
# Strip all control characters. Thanks to ppslim (ppslim@acarr.plus.com).

proc ctrl:filter {str} { 
  regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str 
  return $str 
}

'user' in most of his posts mentioned:
#Not the correct way to remove colors
proc ctrl:filter {str} {
regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\002|\017|\026|\037|\006|\007} $str "" str
return $str

#The correct way to remove colors
proc ctrl:filter {str} {
regsub -all -- {\003([0-9]{1,2}(,[0-9]{1,2})?)?|\002|\017|\026|\037|\006|\007} $str "" str
return $str
}

Code: Select all

#WRONG
regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\002|\017|\026|\037|\006|\007} $str "" str 

#CORRECT
regsub -all -- {\003([0-9]{1,2}(,[0-9]{1,2})?)?|\002|\017|\026|\037|\006|\007} $str "" str 


So use the regular substitution as 'user' has mentioned.

Now I am not a rocketscientist or as good as these guys, but I think maybe user has a point. I don't understand regexp or regsub very well so we will leave this for ppslim (the creator) and user to argue over (both are indeed good scripters). Lets see who wins and who is correct! :mrgreen:
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

or you can save some trouble and use stripcodes (new in eggdrop1.6.17) ..
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Yeah, but I still will be using a strip filter procedure in all of my coming scripts atleast for the coming 4-5 months, because most people might not update to the latest eggdrop1.6.17 so soon. :mrgreen:

So if my scripts have a scriptcodes function to remove control codes, and most people using that script are running old eggdrop versions, older than 1.6.17 then that function will not be defined, causing the script to choke. :wink:
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked