No edit summary |
mNo edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Project | {{Project | ||
|Name=een support bot voor IRC | |Name=een support bot voor IRC | ||
|Status=Active | |Status=Active | ||
|Niche=Excessive stuff | |Niche=Excessive stuff | ||
|Purpose=Tool | |Purpose=Tool | ||
Line 9: | Line 9: | ||
|Category=Surveillance | |Category=Surveillance | ||
}} | }} | ||
<pre> | |||
use strict; | use strict; | ||
use vars qw($VERSION %IRSSI); | use vars qw($VERSION %IRSSI); | ||
Line 34: | Line 35: | ||
do_message($server, $msg, $nick, $target); | do_message($server, $msg, $nick, $target); | ||
} | } | ||
sub do_message($server, $msg, $nick, $target) { | sub do_message($server, $msg, $nick, $target) { | ||
Line 54: | Line 51: | ||
signal_add("message public", "public_message"); | signal_add("message public", "public_message"); | ||
signal_add("message own_public", "own_message"); | signal_add("message own_public", "own_message"); | ||
</pre> |
Latest revision as of 17:33, 27 February 2021
een support bot voor IRC | |
---|---|
Participants | |
Skills | |
Status | Active |
Niche | Excessive stuff |
Purpose | Tool |
Tool | Yes |
Location | text below |
Cost | Zero |
Tool category | Surveillance |
een support bot voor IRC Property "Tool Image" (as page type) with input value "File:{{{Picture}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. {{{Picture}}} {{#if:Yes | [[Tool Owner::{{{ProjectParticipants}}} | }} {{#if:Yes | [[Tool Cost::Zero | }}
use strict; use vars qw($VERSION %IRSSI); use Irssi qw(command_bind signal_add); use Irssi; use Irssi::Irc; use IO::File; $VERSION = '0.01'; %IRSSI = ( authors => 'The0', contact => 'none', name => 'IRCsupbo', description => 'IRC support bot for Irssi', licence => 'screw you', ); sub own_message { my ($server, $msg, $target) = @_; do_message($server, $msg, "", $target); } sub public_message { my ($server, $msg, $nick, $address, $target) = @_; do_message($server, $msg, $nick, $target); } sub do_message($server, $msg, $nick, $target) { my ($server, $msg, $nick, $target) = @_; if ($nick eq "wb9688") { if ($msg =~ m/^([^\?]+)\?(.*)$/) { my $vraag=$1; $vraag =~ s/ /%20/g; my $message="msg #nurds wb9688: https://nurdspace.nl/Special:Search?search=$vraag"; $server->command($message); } } return 0; } signal_add("message public", "public_message"); signal_add("message own_public", "own_message");