This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

script to request bogustrivia bot ignores a streaking player

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
S
SomeoneElse
Voice
Posts: 4
Joined: Sun Oct 17, 2010 11:23 am

script to request bogustrivia bot ignores a streaking player

Post by SomeoneElse »

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 :oops: for asking for so much ...

and having a little cry :cry: 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 :D to anyone who reads this and considers helping.
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Re: script to request bogustrivia bot ignores a streaking pl

Post by willyw »

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: Select all

#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. :)
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: Select all

/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. :)
Perhaps we should re-do the script soon, and allow you to configure it to only work for one nick?
S
SomeoneElse
Voice
Posts: 4
Joined: Sun Oct 17, 2010 11:23 am

Many thanks:)

Post by SomeoneElse »

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.
:D
S
SomeoneElse
Voice
Posts: 4
Joined: Sun Oct 17, 2010 11:23 am

another thought..

Post by SomeoneElse »

Ok - well the stall script is working fine for me as it is - thanks again :) 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. :)
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Re: another thought..

Post by willyw »

SomeoneElse wrote:Ok - well the stall script is working fine for me as it is - thanks again :)
That's great!
You're welcome. :)
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.
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. :)
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. :)

If you prefer, you can PM me here, with a section of log.
S
SomeoneElse
Voice
Posts: 4
Joined: Sun Oct 17, 2010 11:23 am

Post by SomeoneElse »

Message sent :)
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 :)
Post Reply