| View previous topic :: View next topic |
| Author |
Message |
Arnold_X-P Master

Joined: 30 Oct 2006 Posts: 221 Location: DALnet - Trinidad - Beni - Bolivia
|
Posted: Thu Oct 13, 2016 9:55 pm Post subject: Trigger on text ignoring applied color codes |
|
|
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  _________________
thanks to that they help, that others learn 
Last edited by Arnold_X-P on Thu Oct 13, 2016 10:23 pm; edited 1 time in total |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
|
| Back to top |
|
 |
Arnold_X-P Master

Joined: 30 Oct 2006 Posts: 221 Location: DALnet - Trinidad - Beni - Bolivia
|
Posted: Fri Oct 14, 2016 5:04 pm Post subject: |
|
|
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]"
} _________________
thanks to that they help, that others learn  |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Fri Oct 14, 2016 6:02 pm Post subject: proc striprivmsg |
|
|
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
or visit the New Tcl Acrhive at www.tclarchive.org
.
Last edited by SpiKe^^ on Fri Oct 14, 2016 7:10 pm; edited 2 times in total |
|
| Back to top |
|
 |
Arnold_X-P Master

Joined: 30 Oct 2006 Posts: 221 Location: DALnet - Trinidad - Beni - Bolivia
|
Posted: Fri Oct 14, 2016 6:32 pm Post subject: |
|
|
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]"
}
|
 _________________
thanks to that they help, that others learn 
Last edited by Arnold_X-P on Tue Oct 18, 2016 7:56 pm; edited 2 times in total |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Fri Oct 14, 2016 7:02 pm Post subject: |
|
|
Edited my above post to show your reasons and fix. _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
Arnold_X-P Master

Joined: 30 Oct 2006 Posts: 221 Location: DALnet - Trinidad - Beni - Bolivia
|
Posted: Fri Oct 14, 2016 8:40 pm Post subject: |
|
|
perfect bros )
I would like that now its tcl is a global general for all the tcl and that it works so .. is possible bros ? _________________
thanks to that they help, that others learn  |
|
| Back to top |
|
 |
Arnold_X-P Master

Joined: 30 Oct 2006 Posts: 221 Location: DALnet - Trinidad - Beni - Bolivia
|
Posted: Fri Oct 14, 2016 8:46 pm Post subject: |
|
|
friend works very quite thank you
I it added the .conf and its code is employed at global form
thank you _________________
thanks to that they help, that others learn  |
|
| Back to top |
|
 |
Arnold_X-P Master

Joined: 30 Oct 2006 Posts: 221 Location: DALnet - Trinidad - Beni - Bolivia
|
Posted: Fri Oct 14, 2016 9:02 pm Post subject: |
|
|
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 _________________
thanks to that they help, that others learn  |
|
| Back to top |
|
 |
Arnold_X-P Master

Joined: 30 Oct 2006 Posts: 221 Location: DALnet - Trinidad - Beni - Bolivia
|
Posted: Tue Oct 18, 2016 7:50 pm Post subject: |
|
|
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
 _________________
thanks to that they help, that others learn  |
|
| Back to top |
|
 |
Arnold_X-P Master

Joined: 30 Oct 2006 Posts: 221 Location: DALnet - Trinidad - Beni - Bolivia
|
Posted: Sat Sep 16, 2017 4:14 pm Post subject: |
|
|
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. _________________
thanks to that they help, that others learn  |
|
| Back to top |
|
 |
|