Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
weechat-tormodbot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pastly
weechat-tormodbot
Commits
b1fa5741
Commit
b1fa5741
authored
3 years ago
by
Matt Traudt
Browse files
Options
Downloads
Patches
Plain Diff
Don't respond with canned response in cmd_chan b/c message from non-master
parent
e38d36f9
No related branches found
Branches containing commit
Tags
tbb-8.0.6-build1
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tormodbot.py
+11
-6
11 additions, 6 deletions
tormodbot.py
with
11 additions
and
6 deletions
tormodbot.py
+
11
−
6
View file @
b1fa5741
...
...
@@ -325,16 +325,21 @@ def privmsg_cb(data, signal, signal_data):
if
user
.
nick
in
ignores
():
# log('Ignore PRIVMSG from {} in {}', user.nick, dest)
return
w
.
WEECHAT_RC_OK
# Try handling the message as a command if it came from a master in a PM or
# in our command channel. A master's PM may not be a command, so it is
# wrong to return early here.
# Try handling the message as a command if it's from a master in a PM or in
# the cmd_chan, or respond with the canned auto response if non-master and
# PM. Non-masters in our cmd_chan should be ignored.
#
# A master's PM may not be a command, so it is wrong to return early here.
# At least, that's what I wrote before, but now we're doign it. Lol fuck
# me.
if
dest
==
my_nick
()
or
dest
==
cmd_chan
():
# handle commands from masters
if
user
.
nick
in
masters
():
handle_command
(
user
,
dest
,
message
)
el
se
:
resp_dest
=
user
.
nick
if
dest
==
my_nick
()
else
cmd_chan
()
# it's a non-master, if a PM, then do canned respon
se
el
if
dest
==
my_nick
()
:
notice
(
resp_dest
,
'
I am a bot operated by OFTC netops (mostly
'
user
.
nick
,
'
I am a bot operated by OFTC netops (mostly
'
'
pastly) that blocks the
"
libera hamradio
"
spam before
'
'
channels see it. For more information, see {} or ask about
'
'
me in #oftc.
'
,
liberaham_url
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment