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 bot Blind for colors?

General support and discussion of Eggdrop bots.
Post Reply
User avatar
Foxman
Voice
Posts: 9
Joined: Wed Jan 10, 2007 5:24 pm
Location: Delft, Zuid-Holland, The Netherlands
Contact:

How to make Eggdrop bot Blind for colors?

Post by Foxman »

I would like to let my users to be able to use Colors, Bolds, Underlines etc.. and to use public (Eggdrop) commands, to answer Trivia Questions and able to communicate with my AI eggdrop bot.

Or differently said, I would like my eggdrop bot to be blind for Colors, bolds and underline codes...

sounds not to difficult....
How could i make this possible?

Thanks for reading this, or even reply to this ;)
Greetings Foxman
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

I'm not sure this will work, but it's worth a shot :)

Code: Select all

unbind raw - PRIVMSG *raw:irc:msg
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
}
Have you ever read "The Manual"?
User avatar
crux
Voice
Posts: 35
Joined: Fri Jan 05, 2007 12:41 pm
Location: Myanmar
Contact:

Post by crux »

I don't know how to make with color, but if u want trivia with color

Bogus Trivia is the best ... look like mIRC trivia.
User avatar
Foxman
Voice
Posts: 9
Joined: Wed Jan 10, 2007 5:24 pm
Location: Delft, Zuid-Holland, The Netherlands
Contact:

Post by Foxman »

User i would like to Thank you very much for that piece of script ;)
It works like a charm :P

Thanks a lot ;)
User avatar
Foxman
Voice
Posts: 9
Joined: Wed Jan 10, 2007 5:24 pm
Location: Delft, Zuid-Holland, The Netherlands
Contact:

Post by Foxman »

I always die or get killed on a .rehash because of that little script, any idea why or how to solve that?

I did put that little script in a new fresh TCL file, still works like a charm though... except that i can't rehash anymore :P
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Use catch around the unbinds (I assume those are the lines causing the crashes)

Code: Select all

catch {unbind raw - PRIVMSG *raw:irc:msg}
catch {unbind raw - PRIVMSG *raw:PRIVMSG}
Might want to also read here about how to load scripts without crashing the bot:
http://forum.egghelp.org/viewtopic.php?p=63899#63899
User avatar
Foxman
Voice
Posts: 9
Joined: Wed Jan 10, 2007 5:24 pm
Location: Delft, Zuid-Holland, The Netherlands
Contact:

Post by Foxman »

Yes! I can Rehash again, Thank you very much rosc2112 :)
b
br00
Voice
Posts: 9
Joined: Mon Jun 19, 2006 8:09 am

Post by br00 »

what a great little piece of script :)
P
Pberetta
Voice
Posts: 1
Joined: Mon Oct 22, 2007 2:07 pm

Post by Pberetta »

I created strip.tcl like this

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"
Added to egggdrop.conf

But triviascript still doesn't react to users answering in coloured text. Am i doing something wrong? Help would be greatly apreciated

Peer
D
Diablo228
Voice
Posts: 5
Joined: Thu Sep 27, 2007 8:30 pm

Post by Diablo228 »

Thank you so much! I have been fighting with color code issues on Chatspace for months. This little snippet of a script works flawlessly with eggdrop 1.6.19. Users are also able to play BogusTrivia in color now. Sweetness. Thank you all.

--Diablo228--
Post Reply