From 621e01e048b0459983769801294804870c0ffd51 Mon Sep 17 00:00:00 2001 From: Elijah Perrault Date: Wed, 9 Feb 2011 19:53:48 -0700 Subject: [PATCH] Added kick() to API::IRC. --- doc/CHANGELOG | 1 + src/API/IRC.pm | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 80d5e81..d96f4f4 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log 3.0 Indev ================================================================== + * Added kick() to API::IRC. * Added DBI and DBD::SQLite to core dependencies. * Added on_connect hook, triggered after we receive 001. * Updated hooks to use hashrefs. diff --git a/src/API/IRC.pm b/src/API/IRC.pm index f3a4e90..7506034 100644 --- a/src/API/IRC.pm +++ b/src/API/IRC.pm @@ -9,7 +9,7 @@ use warnings; use Exporter; our @ISA = qw(Exporter); -our @EXPORT_OK = qw(cjoin cpart cmode umode privmsg notice quit nick names topic +our @EXPORT_OK = qw(cjoin cpart cmode umode kick privmsg notice quit nick names topic usrc match_mask); @@ -122,6 +122,16 @@ sub topic return 1; } +# Kick a user. +sub kick +{ + my ($svr, $chan, $nick, $msg) = @_; + + Auto::socksnd($svr, "KICK $chan $nick :$msg"); + + return 1; +} + # Quit IRC. sub quit {