| View previous topic :: View next topic |
| Author |
Message |
daigo Voice
Joined: 27 Jun 2014 Posts: 37
|
Posted: Fri Jul 25, 2014 9:30 am Post subject: Respond only when user talks after a time of silence |
|
|
So I want to make my bot says one line of text in response to a user talking in a channel after the user doesn't say anything for at least 30 minutes.
I thought of doing something like, if string match "" (nothing) for a user in the $chan, then wait 1 second, then repeat if string match "" (nothing), wait 1 second, repeat, etc. for 30 minutes, and then after 30 minutes passes, if the code is still running, continue to run the code until the until the user says something, then PRIVMSG $chan with the line I want, and reset the code.
However this seems wildly inefficient, especially if the user changes their nickname or never goes online again, then the code will pretty much run forever.
Is there a better way to go about this? |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Fri Jul 25, 2014 11:49 am Post subject: |
|
|
You want to monitor a single specific user or multiple users?
Depending of the case things could be easy or be complicated, but nevertheless, it's do-able.
Either way you need to monitor the following aspects of user and bot actions: joins, parts, quits, is kicked, or servers splits. _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
daigo Voice
Joined: 27 Jun 2014 Posts: 37
|
Posted: Fri Jul 25, 2014 12:16 pm Post subject: |
|
|
Specific multiple users.
Also, eggdrop cannot detect joins, parts, or quits on this IRC network for some reason (it works fine on other IRC networks, just not this particular one) so I don't need to put anything in the script that will watch for those. This IRC network cannot server split due to the way the network is modified (not RFC-compliant) so that's not an issue either. Channel kicks are disabled on this network, so also not a problem. |
|
| Back to top |
|
 |
|
|
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
|
|