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 

Trigger on text ignoring applied color codes

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Arnold_X-P
Op


Joined: 30 Oct 2006
Posts: 140
Location: DALnet - Trinidad - Beni - Bolivia

PostPosted: Thu Oct 13, 2016 9:55 pm    Post subject: Trigger on text ignoring applied color codes Reply with quote

is possible that the tcl recognizes the colors in the command !version example !version or !version


bind pub - !version version

proc version {nick host hand chan arg} {
global botnick
puthelp "NOTICE $nick :I am a called $botnick. running in [lindex $version 0]"
}

that the tcl also recognizes the command in colors Razz
_________________
Very Happy thanks to that they help, that others learn Very Happy


Last edited by Arnold_X-P on Thu Oct 13, 2016 10:23 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
SpiKe^^
Master


Joined: 12 May 2006
Posts: 498
Location: Tennessee, USA

PostPosted: Thu Oct 13, 2016 10:15 pm    Post subject: Reply with quote

See this forum thread --> http://forum.egghelp.org/viewtopic.php?t=19880
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
Back to top
View user's profile Send private message Visit poster's website
Arnold_X-P
Op


Joined: 30 Oct 2006
Posts: 140
Location: DALnet - Trinidad - Beni - Bolivia

PostPosted: Fri Oct 14, 2016 5:04 pm    Post subject: Reply with quote

I me do not work why my question is

command !version example !version or !version

that the command in open channel recognizes colors in bind pub - !version version

-----------------------------

bind pub - !version version

proc version {nick host hand chan arg} {
global botnick
puthelp "NOTICE $nick :I am a called $botnick. running in [lindex $version 0]"
}
_________________
Very Happy thanks to that they help, that others learn Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
SpiKe^^
Master


Joined: 12 May 2006
Posts: 498
Location: Tennessee, USA

PostPosted: Fri Oct 14, 2016 6:02 pm    Post subject: proc striprivmsg Reply with quote

Yes, exactly.

That code linked above is the only sure-fire way I know to have binds trigger on colored text.

The reason proc version is not replying is that glaring error you must be ignoring.

And yes, striprivmsg does in fact work great:) Try it something like this...
Code:

catch {unbind raw - PRIVMSG *raw:irc:msg}
bind raw - PRIVMSG striprivmsg

proc striprivmsg {f k a} {
  set a [string map [list \017 ""] [stripcodes abcgru $a]]
  *raw:irc:msg $f $k $a
}

bind pub - !version version

proc version {nick host hand chan arg} {

  # !!!! If you are going to use the global $version, you must list it here !!!! #
  global botnick version

  puthelp "NOTICE $nick :I am a called $botnick. running in [lindex $version 0]"
}


_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com


Last edited by SpiKe^^ on Fri Oct 14, 2016 7:10 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
Arnold_X-P
Op


Joined: 30 Oct 2006
Posts: 140
Location: DALnet - Trinidad - Beni - Bolivia

PostPosted: Fri Oct 14, 2016 6:32 pm    Post subject: Reply with quote

I me do not work why my question is

command !version example !version or !version

that the command in open channel recognizes colors in bind pub - !version version

Code:

bind pub - !version version

proc version {nick host hand chan arg} {
global botnick
puthelp "NOTICE $nick :I am a called $botnick. running in [lindex $version 0]"
}



_________________
Very Happy thanks to that they help, that others learn Very Happy


Last edited by Arnold_X-P on Tue Oct 18, 2016 7:56 pm; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
SpiKe^^
Master


Joined: 12 May 2006
Posts: 498
Location: Tennessee, USA

PostPosted: Fri Oct 14, 2016 7:02 pm    Post subject: Reply with quote

Edited my above post to show your reasons and fix.
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
Back to top
View user's profile Send private message Visit poster's website
Arnold_X-P
Op


Joined: 30 Oct 2006
Posts: 140
Location: DALnet - Trinidad - Beni - Bolivia

PostPosted: Fri Oct 14, 2016 8:40 pm    Post subject: Reply with quote

perfect bros Smile)


I would like that now its tcl is a global general for all the tcl and that it works so .. is possible bros ?
_________________
Very Happy thanks to that they help, that others learn Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Arnold_X-P
Op


Joined: 30 Oct 2006
Posts: 140
Location: DALnet - Trinidad - Beni - Bolivia

PostPosted: Fri Oct 14, 2016 8:46 pm    Post subject: Reply with quote

friend works very quite thank you
I it added the .conf and its code is employed at global form
thank you
_________________
Very Happy thanks to that they help, that others learn Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Arnold_X-P
Op


Joined: 30 Oct 2006
Posts: 140
Location: DALnet - Trinidad - Beni - Bolivia

PostPosted: Fri Oct 14, 2016 9:02 pm    Post subject: Reply with quote

spike^^
notice that its tcl works only in open channel
but it does not work when it is in privately texts with colors in the bot
_________________
Very Happy thanks to that they help, that others learn Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Arnold_X-P
Op


Joined: 30 Oct 2006
Posts: 140
Location: DALnet - Trinidad - Beni - Bolivia

PostPosted: Tue Oct 18, 2016 7:50 pm    Post subject: Reply with quote

SpiKe^^it works very well, now the bot will ignore the colors in the texts.
the combining both tcl, (SpiKe^^ and caesar of -> http://forum.egghelp.org/viewtopic.php?t=19880)

the combination of both tcl, it gave like the result to which this works well, they do not pay attention of the colors in the texts in the open channel as well as also in the private one.
thanks SpiKe^^ and caesar for the help..


NOTE..

so that this tcl should work in global form it is necessary to add this one
tcl in the .conf like that the tcl will work in global form

Code:

catch {unbind raw - PRIVMSG *raw:irc:msg}
catch {unbind raw - PRIVMSG *raw:PRIVMSG}

bind raw - PRIVMSG striprivmsg
proc striprivmsg {f k a} {
  set a [string map [list \017 ""] [stripcodes abcgru $a]]
  *raw:irc:msg $f $k $a
  *raw:PRIVMSG $f $k $a
}   


ignore colors in the texts, in the open channel



ignore colors in the texts, in the private bot


_________________
Very Happy thanks to that they help, that others learn Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Arnold_X-P
Op


Joined: 30 Oct 2006
Posts: 140
Location: DALnet - Trinidad - Beni - Bolivia

PostPosted: Sat Sep 16, 2017 4:14 pm    Post subject: Reply with quote

hi spike^^

the tcl works very well but it works by grabbing all the tcl it is possible that it only works in a tcl..

example
that works only in the tcl where it was added.
_________________
Very Happy thanks to that they help, that others learn Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
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