Internalbinds can be used to react on specific events. This allows shroudBNC users to customise many aspects of the bouncer behaviour.
Bind a new event
internalbind <type> <procedure> ?pattern? ?user?
Unbind an existing event
internalunbind <type> <procedure> <pattern> <user>
List all currently active internalbinds. It returns a list, each list item containing another list with these items: type procedure pattern user
internalbinds
| Type | Parameters | Pattern | User | since | Description |
|---|---|---|---|---|---|
| client | client parameters | x | x | client sends string to shroudBNC | |
| server | client parameters | x | x | server sends string to shroudBNC | |
| pre | executed before any other event | ||||
| post | executed after any other event | ||||
| attach | client | x | client connects to shroudBNC | ||
| detach | client | x | client disconnects from shroudBNC | ||
| modec | client parameters | x | IRC Server sends a single channel mode change to shroudBNC | ||
| unload | TCL module is unloaded | ||||
| svrconnect | client | x | shroudBNC connects to an IRC Server | ||
| svrdisconnect | client | x | shroudBNC disconnects from an IRC Server | ||
| svrlogon | client | x | shroudBNC received “end of motd” from the IRC Server | ||
| usrload | client | x | |||
| usrcreate | client | x | a shroudBNC user is created | ||
| usrdelete | client | x | a shroudBNC user is deleted | ||
| command | client parameters | x | x | client sends a shroudBNC command with ”/sbnc …” or “PRIVMSG -sBNC :…” | |
| settag | parameters | 1.2 | a usertag is set with setbncuser | ||
| prerehash | 1.2 | tcl rehash was called, binds are triggered before the rehash is initiated | |||
| postrehash | 1.2 | tcl rehash was called, binds are triggered after the rehash is finished | |||
| channelsort | client parameters | x | 1.2 | client attaches to sbnc, bind is called before shroudBNC sends channels to the client |
| Parameters | |
|---|---|
| client | user name |
| parameters | list of parameters |
# # call the procedure "example_usrcreate" when # a new user is added to shroudBNC # internalbind usrcreate example_usrcreate # # set default server and port for the user # # @param string $client username # @return void # proc example_usrcreate {client} { setbncuser $client server "irc.quakenet.org" setbncuser $client port 6667 }
You should not use the optional pattern and user parameters. Those are unstable.