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.

how to make eggdrop strip colors from ctcr

Help for those learning Tcl or writing their own scripts.
Post Reply
s
simo
Revered One
Posts: 1107
Joined: Sun Mar 22, 2015 2:41 pm

how to make eggdrop strip colors from ctcr

Post by simo »

i alread found this tcl and was wondering how to make it strip colors in ctcr too for whatever VERSION/TIME and what not

Code: Select all

catch {unbind raw - PRIVMSG *raw:irc:msg}
catch {unbind raw - PRIVMSG *raw:PRIVMSG}
bind raw - PRIVMSG striprivmsg
proc striprivmsg {f k a} {
	set a [stripcodes abcgru $a]
	*raw:irc:msg $f $k $a
	*raw:PRIVMSG $f $k $a
}

putlog "colourstripper... Loaded"
w
willyw
Revered One
Posts: 1205
Joined: Thu Jan 15, 2009 12:55 am

Re: how to make eggdrop strip colors from ctcr

Post by willyw »

simo wrote:i alread found this tcl and was wondering how to make it strip colors in ctcr too for whatever VERSION/TIME and what not

...
Go here:
http://www.eggheads.org/support/egghtml ... mands.html

and text search to find: bind ctcr

Experiment with that bind.
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
s
simo
Revered One
Posts: 1107
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

yea i looked there but couldnt figure it

i need to strip colors from ctcp version reply i was told that is a NOTICE
i just cant figure how to do that
w
willyw
Revered One
Posts: 1205
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

simo wrote:yea i looked there but couldnt figure it

i need to strip colors from ctcp version reply i was told that is a NOTICE
i just cant figure how to do that

Play with this to see how to use
bind ctcr

Code: Select all

# April 23, 2015
# http://forum.egghelp.org/viewtopic.php?p=103927#103927


bind ctcr - * ctcr_proc

proc ctcr_proc {nick uhost handle dest keyword text} {

        putserv "privmsg your_nick_here :$nick $uhost $handle $dest $keyword $text"

        putserv "privmsg your_nick_here :Using stripcodes :[stripcodes bcruag $text]"
}
Do:
.tcl putserv "privmsg some_nick_here :\001VERSION\001"

from the partyline, to make the bot send out a CTCP version

With that bind ctcp above loaded, bot will trigger on the ctcr reply to it.
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
s
simo
Revered One
Posts: 1107
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

thx willyw that helped a lot apreciated
Post Reply