API Reference
- 1. Constants
- 1.1. OerPerl::BLOCK_OER_COMMAND (1)
- 1.2. OerPerl::CHANNEL (1)
- 1.3. OerPerl::DEBUG (0|1)
- 1.4. OerPerl::DEBUG_NONE (0)
- 1.5. OerPerl::DEBUG_FATAL (1)
- 1.6. OerPerl::DEBUG_ERROR (2)
- 1.7. OerPerl::DEBUG_WARNING (3)
- 1.8. OerPerl::DEBUG_INFO (4)
- 1.9. OerPerl::DEBUG_NOISE (8)
- 1.10. OerPerl::DEBUG_FLOOD (9)
- 1.11. OerPerl::USER (0)
- 2. Functions
- 2.1. OerPerl::add_command_handler(
command,callback) - 2.2. OerPerl::add_event_handler(
event_type,callback) - 2.3. OerPerl::add_timer(
interval,callback) - 2.4. OerPerl::is_valid_channel(
channel) - 2.5. OerPerl::oer_debug(
debuglevel,message) - 2.6. OerPerl::register_shutdown_callback(
callback) - 2.7. OerPerl::register_startup_callback(
callback) - 2.8. OerPerl::sendto(
target,target_type,message)
- 2.1. OerPerl::add_command_handler(
1. Constants
1.1. OerPerl::BLOCK_OER_COMMAND (1)
Has the value of 1 that can be returned from an overriding command handler to block the command from being executed normally in oer.
1.2. OerPerl::CHANNEL (1)
Can be used in target_type argument of OerPerl::sendto to denote that the message is being sent to a channel instead of a user.
1.3. OerPerl::DEBUG (0|1)
Has the value of 0 if oerperl was compiled in non-debug mode, 1 if in debug.
1.4. OerPerl::DEBUG_NONE (0)
1.5. OerPerl::DEBUG_FATAL (1)
1.6. OerPerl::DEBUG_ERROR (2)
1.7. OerPerl::DEBUG_WARNING (3)
1.8. OerPerl::DEBUG_INFO (4)
1.9. OerPerl::DEBUG_NOISE (8)
1.10. OerPerl::DEBUG_FLOOD (9)
Constants holding integer values for debug levels that can be passed to OerPerl::oer_debug.
1.11. OerPerl::USER (0)
Can be used in target_type argument of OerPerl::sendto to denote that the message is being sent to a user instead of a channel.
2. Functions
2.1. OerPerl::add_command_handler(command, callback)
Adds a new command handler for command command with callback callback.
See the User Manual chapter 2.3 Command handlers for example usage.
2.2. OerPerl::add_event_handler(event_type, callback)
Adds a new event handler callback callback that receives events of type event_type.
See the User Manual chapter 2.2 Event handlers for example usage.
2.3. OerPerl::add_timer(interval, callback)
Adds callback as a timer to be called every interval seconds.
The minimum interval is 1 second.
2.4. OerPerl::is_valid_channel(channel)
Returns 1 if the string channel is a valid channel name, 0 if it’s not.
2.5. OerPerl::oer_debug(debuglevel, message)
Outputs message to the oer console with debug level debuglevel.
The message will be visible if debuglevel is less than or equal to the debuglevel oer was started in (-d[0-9]).
2.6. OerPerl::register_shutdown_callback(callback)
Registers callback as a shutdown callback for the script.
2.7. OerPerl::register_startup_callback(callback)
<
Registers callback as a startup callback for the script.
2.8. OerPerl::sendto(target, target_type, message)
Sends message as a PRIVMSG to a channel (if target_type is OerPerl::CHANNEL) or as a NOTICE to a user (if target_type is OerPerl::USER).
OerPerl::USER messages will be sent as PRIVMSG if oer global flag 'm' is set.
