-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add bind defined values to docs #1521
Conversation
+-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | ||
| MATCH_CASE | Check the triggering value exactly against the bind mask value (case sensitive) | | ||
+-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | ||
| MATCH_MASK | Check if the bind mask is contained within the triggering value, as a wildcarded value | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think "contained" is right, it checks if it matches fully
+-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | ||
| MATCH_MASK | Check if the bind mask is contained within the triggering value, as a wildcarded value | | ||
+-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | ||
| MATCH_MODE | Check if the triggering value is contained within the bind mask, as a wildcarded value | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mask is like MATCH_MASK until the first space, then it is MATCH_CASE. Specifically written for mode binds where "#channel +o" case is irrelevant for #channel but matters for +o.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you write this one up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Special mode for
bind mode
which is likeMATCH_MASK
but case insensitive before the first spaceand case sensitive after
+-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | ||
| MATCH_MODE | Check if the triggering value is contained within the bind mask, as a wildcarded value | | ||
+-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | ||
| MATCH_CRON | Check the triggering value against a bind mask formatted as a cron entry, ie "30 7 6 7 * " triggers a mask for "30 7 * * * " | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example should not contain * anymore, it is triggered with concrete values like "30 7 6 7 5"
+-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | ||
| BIND_STACKRET | Used with BIND_WANTRET; allow stacked binds to continue despite receiving a '1' | | ||
+-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | ||
| BIND_ALTER_ARGS | Replaces arguments (which ones?) with the result returned from the called Tcl proc | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't figure out what this was ever used for and it is not currently used for any bind types in Eggdrop. I propose leaving it undocumented.
+----------------+--------------------------------------------------------------------------------------------------------------+ | ||
| BIND_EXEC_LOG | The bind criteria was met, the Tcl proc was called, and Eggdrop logged the bind being called | | ||
+----------------+--------------------------------------------------------------------------------------------------------------+ | ||
| BIND_QUIT | The bind was triggered in conjunction with the target leaving the partyline or filesys area (?) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.quit is bound to a special value CMD_LEAVE that doesn't really trigger a bind but sets the Tcl result to the magic string "break" which is then used to detect this and signal the intention to quit the partyline/filesys by making the bind call return BIND_QUIT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you write this one up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sentinel value to signal
.quit
was triggered to leave the current partyline/filesys area (virtual bind toCMD_LEAVE
)
Found by: Geo
Patch by: Geo
Fixes: #1446
One-line summary:
Add explanations of #define'd values commonly used in creating Tcl binds when building new modules
@thommey please review and fix anything- some of this is just guesswork from looking at code. Specifically, MATCH_MODE, BIND_WANTRET, BIND_ALTER_ARGS, BIND_AMBIGUOUS, BIND_QUIT