From 98cfa1acacc66ba30bea46580df6d7db482cbb27 Mon Sep 17 00:00:00 2001 From: Elijah Perrault Date: Mon, 24 Jan 2011 22:26:04 -0700 Subject: [PATCH] Added names() to API::IRC which sends NAMES. --- doc/CHANGELOG | 1 + src/API/IRC.pm | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index d72559e..72b1e74 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log 3.0 Indev ================================================================== + * Added names() to API::IRC which sends NAMES. * Parse NAME replies (Numeric:353). * Parse Numeric:005 and store PREFIX's data. * Bug fix: The bot's nick is now stored correctly. diff --git a/src/API/IRC.pm b/src/API/IRC.pm index 0dd45b3..afb1ec2 100644 --- a/src/API/IRC.pm +++ b/src/API/IRC.pm @@ -75,6 +75,16 @@ sub nick $Parser::IRC::botnick{$svr}{newnick} = $newnick; } +# Request the users of a channel. +sub names +{ + my ($svr, $chan) = @_; + + Auto::socksnd($svr, "NAMES $chan"); + + return 1; +} + # Quit IRC. sub quit {