Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible rewrite to allow custom send time #49

Open
NiklasAurora opened this issue Sep 24, 2018 · 1 comment
Open

Possible rewrite to allow custom send time #49

NiklasAurora opened this issue Sep 24, 2018 · 1 comment

Comments

@NiklasAurora
Copy link
Contributor

irc2phpbb/marvin.py

Lines 295 to 300 in be7ec47

else:
for action in GENERAL_ACTIONS:
msg = action(set(row), row, raw)
if msg:
sendPrivMsg(msg, words[2])
break

As of now, this implementation lets Marvin respond to phrases without being mentioned. However, his response will be sent immediately after, as if he was mentioned.

Solutions tried:

  • Adding a file to /incoming but as Marvin reads the message, he outputs what's in /incoming, instantly writing the message anyway.

  • Sleep() queues any further actions from Marvin, which results in tons of spam from him depending on activity on the forums and questions asked.

  • Multithreaded/async-await: move the write to chat to another thread, then sleep. However, this would mean most of Marvin would have to be rewritten or I am completely lost in how to implement it. (most likely the latter).

Possible solutions would be a new folder for queued messages, unsure of rest of implementation but would have to be separate from /incoming

@mosbth
Copy link
Owner

mosbth commented Oct 3, 2024

Perhaps sleep a second or two before submitting a reply, so it seems more like he is actually pressing the keyboard before replying.

Unsure if marvin should have som spam-detection to avoid sending many messages, that has not been an issue this far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants