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 

script to request bogustrivia bot ignores a streaking player

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


Joined: 17 Oct 2010
Posts: 4

PostPosted: Thu Oct 21, 2010 10:05 am    Post subject: script to request bogustrivia bot ignores a streaking player Reply with quote

I know it's a strange request. Here's the problem:

-We have a reasonably popular, established channel with a steady following of regular trivia players and chatters.
-We also have a slightly obsessed and unnaturally fast player who thinks nothing of getting over a 100 answers correct in a row - and in the process, clearing the room of other players completely.
-We're at the stage now where others enter the room, see the streaker playing, and part again.

To save the room I am hoping we can organise a script that could quietly ignore streakers for just a minute or so after they get a certain number of correct answers. Room messages have been posted warning this may happen - and I have set .+ignore manually a couple of times via partyline. I don't really want to give bot access to other ops at this time though.

So ideally, when the bot sees "XYZ has won 6 in a row!" it ignores XYZ for a minute. Just enough time for others to get an answer or two in.

Don't know if it's possible, but it would also be great if our ops could enable or disable the script via a msg to the bot or other command. There are times when people are genuinely playing on their own simply because there is nobody else around, and that's fine.

So now this is me blushing Embarassed for asking for so much ...

and having a little cry Crying or Very sad please help save our room from turning into a one player hangout (I read on the sticky note that crying and blushing could help ...)

and saying thanks Very Happy to anyone who reads this and considers helping.
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Thu Oct 21, 2010 1:52 pm    Post subject: Re: script to request bogustrivia bot ignores a streaking pl Reply with quote

SomeoneElse wrote:

...
So ideally, when the bot sees "XYZ has won 6 in a row!" it ignores XYZ for a minute. Just enough time for others to get an answer or two in.


But, if "XYZ has won 6 in a row!" was said by the bot, I seem to recall that the bot doesn't 'see' what it says itself.

I have a couple ideas though, but unfortunately am short on time at the moment, to explore them.

This might be fun to play around with though, for now.
Not at all sure if it will help you or not. It is not automatic.
A user with the o flag in your bot can send a /msg to the bot, and have the bot ignore a given user's nick.
Ignore does expire automatically though.


Code:

#set your trivia channel name
set trivchan "#channelname"

#set stall time (in seconds) here
set stalltime "20"


bind msg o "!stall" stallplayer


proc stallplayer {nick uhost handle text} {
global trivchan stalltime

   if {![onchan $text $trivchan]} {
      putserv "privmsg $nick :$text is not on channel $trivchan"
      return
         }

newignore *!*[getchanhost $text $trivchan] $nick "Stalling his play" 5

utimer $stalltime [list killignore *!*[getchanhost $text $trivchan] ]

}



The trailing "5" on the newignore line, isn't necessary. It is left over from when I experimented a bit. It would be a fail-safe though... in that the new ignore would expire in 5 minutes, even if the utimer failed somehow.

This little script surely could use improvements. Smile
It is just something quick.

With a test or two, it worked.

Give it a try. A user with +o in your bot can send:
Code:

/msg botnick !stall nick_to_stall


And set an ignore, for the number of seconds you've configured.

If they abuse it, it could be a really rotten thing. Smile
Perhaps we should re-do the script soon, and allow you to configure it to only work for one nick?
Back to top
View user's profile Send private message
SomeoneElse
Voice


Joined: 17 Oct 2010
Posts: 4

PostPosted: Thu Oct 21, 2010 4:40 pm    Post subject: Many thanks:) Reply with quote

Thanks so much for this - wasn't expecting such a quick reply. It looks great to me and I'll give it a go this evening. I hadn't even thought about the bot not "seeing" its own text - which makes sense of course.

The manual setting is probably just what we need anyway - will allow others to have a bit of fun in quiet times and streak to their hearts content. Other ops have (or will have) enough flags to do this. I was just reluctant to add anyone else as masters as this particular bot is a friend's baby and I did't want to stuff it up in any way.

Thanks again - will reply again as soon as we have tested it.
Very Happy
Back to top
View user's profile Send private message
SomeoneElse
Voice


Joined: 17 Oct 2010
Posts: 4

PostPosted: Tue Oct 26, 2010 8:05 am    Post subject: another thought.. Reply with quote

Ok - well the stall script is working fine for me as it is - thanks again Smile The only thing is that while we have quite a few ops, there are still periods of the day when the room isn't opped or the ops are idle (or asleep). And of course those are the times when the main offender seems to be playing now.

Just an idea - but could a different bot see that someone "has won x in a row" and then issue the !stall msg to the triviabot? We have a couple of bots languishing without jobs to do as it happens - so this could give them a reason for existing. Smile
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Tue Oct 26, 2010 9:19 am    Post subject: Re: another thought.. Reply with quote

SomeoneElse wrote:
Ok - well the stall script is working fine for me as it is - thanks again Smile


That's great!
You're welcome. Smile

Quote:

The only thing is that while we have quite a few ops, there are still periods of the day when the room isn't opped or the ops are idle (or asleep). And of course those are the times when the main offender seems to be playing now.


"now". heheheeh
He reacted, eh? Sounds like you had an effect on him.
In a way, it is kind of funny.

Quote:

Just an idea - but could a different bot see that someone "has won x in a row" and then issue the !stall msg to the triviabot? We have a couple of bots languishing without jobs to do as it happens - so this could give them a reason for existing. Smile


Instead of replying with a simple "Yes", I'll be safe and say:
Probably.

What we would need, is the exact text. It might be best to see a section of log, that contains examples. (The log from the trivia bot wouldn't do it... must be from either your client, or another un-involved bot)

Then, there are other possibilities too. Depends on what is available, and your assessment of those options, as to what you'd like best.

Off the top of my head, some ircd's offer extended bans. Perhaps something could be done with them... a ban that does not kick the user, but silences him. You'd have to check into it, and see what is available there to work with.
With this though, he would see it applied, and removed.

With what you have now, he doesn't see it.
By the way, has he questioned it, or figured out what is happening to him?

If the trivia bot produces a unique message, we can probably have another bot watch for it. I assume it will include the 'offender's' nick, and that will help make it unique. If we can bind to it, with no chance of false triggering, then sure - we can have the second bot send a /msg to the first bot. Smile

If you prefer, you can PM me here, with a section of log.
Back to top
View user's profile Send private message
SomeoneElse
Voice


Joined: 17 Oct 2010
Posts: 4

PostPosted: Tue Oct 26, 2010 11:59 pm    Post subject: Reply with quote

Message sent Smile
Just some more information for anyone else who may be reading and thinking this isn't quite right. This is actually just a measure to try and keep all our regular chatters happy and wanting to stay in our channel.
The whole issue has been openly discussed in the room and messages have been added to the bogus script, warning that lengthy streaks by any one player may mean they could be ignored by the bot for a short period. At the moment the ignore has been set to 60secs which is long enough for at least one other person to grab an answer.
I am sure all triviaholics will understand Smile
Back to top
View user's profile Send private message
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