Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # this gets called when the plugin is loaded
- sub start {
- my $class = shift;
- my ($kernel, $heap) = @_[KERNEL, HEAP];
- # here you register what keywords this plugin should respond to
- register_request_keywords($class, 'helloworld', "helloworld: Example plugin, useful for testing if the bot is working. Usage: helloworld");
- }
- # got a request
- sub got_request {
- my $class = shift;
- my ($kernel, $heap, $user, $location, $replyto, $extra, $keyword, $message) = @_[KERNEL, HEAP, ARG0, ARG1, ARG2, ARG3, ARG4, ARG5];
- # $keyword gets set to the command the user used to trigger this plugin
- # $message gets set to the rest of the line
- # this is how you reply to a
- reply($kernel, $replyto, $extra, "Hello, World!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement