| View previous topic :: View next topic |
| Author |
Message |
daigo Voice
Joined: 27 Jun 2014 Posts: 37
|
Posted: Mon Jun 30, 2014 6:15 pm Post subject: Change from private message to public channel (BogusTrivia) |
|
|
| The IRC network I am on has private messages, notices, etc. disabled, so I cannot control the BogusTrivia script on there via PM to the bot. Is there a way I can edit the script so that everything is done via public channel instead of private messaging the bot? |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Tue Jul 01, 2014 8:17 am Post subject: Re: Change from private message to public channel (BogusTriv |
|
|
| daigo wrote: | | The IRC network I am on has private messages, notices, etc. disabled, so I cannot control the BogusTrivia script on there via PM to the bot. .... |
Before you get into all that, try to find out exactly what the IRC network is doing to accomplish this.
I have bots on one IRC network that blocks CTCP, for example. Upon further investigation, it is merely a default setting - a user mode flag that is applied to every login. The solution was simple then : simply toggle it off, upon every time the bot logs in.
What network is it? |
|
| Back to top |
|
 |
daigo Voice
Joined: 27 Jun 2014 Posts: 37
|
Posted: Tue Jul 01, 2014 1:02 pm Post subject: |
|
|
| It is the twitch.tv IRC network. |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Tue Jul 01, 2014 9:03 pm Post subject: |
|
|
As I told you in IRC chat, do
/mode your_nick
and see what the reply is. Perhaps there are some user mode flags set by default upon log in. You may have to visit their website or something to find out the meaning of any that you find.
For some reason unknown to me, you simply stopped responding there.
Maybe you had some emergency pop up? |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Sun Jul 06, 2014 2:04 pm Post subject: |
|
|
daigo,
First off, I agree completely with willyw.
It would be better to just remove the irc mode that is disabling private message from yourself & the trivia bot.
Anything else forces us to try modifying BogusTrivia.
That being said, I have worked up an untested public .add\.mix patch for BogusTrivia.
This should disable the private message .add & .mix commands and create public .add & .mix commands.
You will need to edit your t-2.tcl file as follows:
Step #1
On or about line 3224, find this line of code... | Code: | | bind msgm $t2(mflag) y* TReply ; bind msgm $t2(mflag) n* TReply | and replace that line with this code... | Code: | | bind pubm $t2(mflag) y* TPubReply ; bind pubm $t2(mflag) n* TPubReply |
Step #2
On or about line 3582, find this line of code... | Code: | | unbind msgm $t2(mflag) $trgr* TReply | and replace that line with this code... | Code: | | unbind pubm $t2(mflag) $trgr* TPubReply |
Step #3
On or about line 671, find these 3 lines of code... | Code: | if {$t2(m-cmdpre) ne "."} { bind msgm $t2(mflag) $t2(m-cmdpre)add* TAdd
bind msg $t2(mflag) $t2(m-cmdpre)mix TMix
} else { bind msgm $t2(mflag) .add* TAdd ; bind msg $t2(mflag) .mix TMix } | and replace those 3 lines with this code... | Code: | bind pubm $t2(mflag) $t2(m-cmdpre)add* TPubAdd
bind pub $t2(mflag) $t2(m-cmdpre)mix TPubMix
proc TPubAdd {nk uh hn ch tx} {
TAdd $ch $uh $hn $tx
return 0
}
proc TPubMix {nk uh hn ch tx} {
TMix $ch $uh $hn $tx
return 0
}
proc TPubReply {nk uh hn ch tx} {
TReply $ch $uh $hn $tx
return 0
} |
Step #4
Save the file, Upload the patched file to the bot, and Rehash to load the patch.
Notes:
Line numbers reference BogusTrivia 2.06.4.6 (patch should work on other versions).
New public .add/.mix commands use the original .add/.mix settings for flags & command prefix.
Please let me know how it works out for you. _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
|