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 

Change from private message to public channel (BogusTrivia)

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
daigo
Voice


Joined: 27 Jun 2014
Posts: 37

PostPosted: Mon Jun 30, 2014 6:15 pm    Post subject: Change from private message to public channel (BogusTrivia) Reply with quote

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
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Tue Jul 01, 2014 8:17 am    Post subject: Re: Change from private message to public channel (BogusTriv Reply with quote

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
View user's profile Send private message
daigo
Voice


Joined: 27 Jun 2014
Posts: 37

PostPosted: Tue Jul 01, 2014 1:02 pm    Post subject: Reply with quote

It is the twitch.tv IRC network.
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Tue Jul 01, 2014 9:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
SpiKe^^
Owner


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

PostPosted: Sun Jul 06, 2014 2:04 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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