Initial HalfOps features#1825
Conversation
| /** Called when a nick is dehalfopped on a channel */ | ||
| virtual void OnDeHalfOp2(const CNick* pOpNick, const CNick& Nick, | ||
| CChan& Channel, bool bNoChange); | ||
| virtual void OnDeHalfOp(const CNick& OpNick, const CNick& Nick, CChan& Channel, |
There was a problem hiding this comment.
If adding new callbacks, need to update modperl and modpython
There was a problem hiding this comment.
You've missed the function.in files.
| Info.SetWikiPage("autohalfop"); | ||
| } | ||
|
|
||
| NETWORKMODULEDEFS(CAutoHalfOpMod, t_s("Auto halfop the good people")) |
There was a problem hiding this comment.
We shouldn't copypaste/duplicate code like that. A better way would be to have a single module which supports ops, voices, halfops
There was a problem hiding this comment.
Perhaps that shall be my second contribution.
There was a problem hiding this comment.
Perhaps it shall.
I believe merging this PR can wait until that's done though.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1825 +/- ##
==========================================
- Coverage 41.87% 40.91% -0.97%
==========================================
Files 122 124 +2
Lines 27799 28471 +672
Branches 33 33
==========================================
+ Hits 11642 11649 +7
- Misses 16132 16797 +665
Partials 25 25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Updated missed calls in modperl and modpython.
Logic updates.
|
Ready for another look |
|
I've added a new 'automode' module that can do automatic arbitrary mode changes. |
|
@DarthGandalf Have you looked at the new automode module yet? |
DarthGandalf
left a comment
There was a problem hiding this comment.
To clarify: it doesn't check the key like autoop did?
| if (Nick.GetNick() == GetNetwork()->GetIRCNick().GetNick()) { | ||
| const map<CString, CNick>& msNicks = Channel.GetNicks(); | ||
| for (const auto& it : msNicks) { | ||
| if (!it.second.HasPerm(CChan::HalfOp)) { |
There was a problem hiding this comment.
Ah, good catch. That needs to become more robust.
| "[channels]")); | ||
| } else if (sMode != "q" && sMode != "a" && sMode != "o" && | ||
| sMode != "h" && sMode != "v") { | ||
| PutModule("<mode> must be one of the following: qaohv"); |
There was a problem hiding this comment.
It seems to work fine.. what is t_s anyway?
I removed the key mechanism altogether because I don't know a single person who doesn't just use NOKEY. Having to request it sort of defeats the purpose of calling it 'auto'... |
|
t_s is for localisation support. Visible messages should be translateable
Key is for efnet etc. You and another person add each other with the same
key, and the module cryptographically checks that the key is the same
instead of only relying on hostmask
сб, 5 мар. 2022 г., 03:01 Jonathan Rudolph ***@***.***>:
… I removed the key mechanism altogether because I don't know a single
person who doesn't just use *NOKEY*. Having to request it sort of defeats
the purpose of calling it 'auto'...
—
Reply to this email directly, view it on GitHub
<#1825 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACPLZCCDDCK7YOQDWYZDY3U6LFALANCNFSM5PL2RDBQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
It's still auto, because module requests it itself when nick and host match
сб, 5 мар. 2022 г., 03:01 Jonathan Rudolph ***@***.***>:
… I removed the key mechanism altogether because I don't know a single
person who doesn't just use *NOKEY*. Having to request it sort of defeats
the purpose of calling it 'auto'...
—
Reply to this email directly, view it on GitHub
<#1825 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACPLZCCDDCK7YOQDWYZDY3U6LFALANCNFSM5PL2RDBQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Almost entirely copy/paste with small edits to function names.
Added autohalfop module, nearly the same as the autoop module.