Added nick() to API::IRC and fixed a typo.
This commit is contained in:
1 parent
40db6be9ca
commit
ccc66f5a4e
2 files changed
+24
-8
No files matched your search
+2
-1
@@ -3,7 +3,8 @@ Auto IRC Bot 3.0: Change Log
|
||||
|
||||
3.0 Indev
|
||||
==================================================================
|
||||
* Added $got_001 to Parser::IRC for checking if we've been
|
||||
* Added nick() to API::IRC.
|
||||
* Added %got_001 to Parser::IRC for checking if we've been
|
||||
sent 001.
|
||||
* Renamed API::IRC::mode() to cmode()
|
||||
* Added mod_init() and mod_void() to API::Std.
|
||||
|
||||
+22
-7
@@ -13,14 +13,16 @@ our @EXPORT_OK = qw(cjoin cpart mode privmsg notice quit);
|
||||
|
||||
|
||||
# Join a channel.
|
||||
sub cjoin {
|
||||
sub cjoin
|
||||
{
|
||||
my ($svr, $chan) = @_;
|
||||
|
||||
Auto::socksnd($svr, "JOIN $chan");
|
||||
}
|
||||
|
||||
# Part a channel.
|
||||
sub cpart {
|
||||
sub cpart
|
||||
{
|
||||
my ($svr, $chan, $reason) = @_;
|
||||
|
||||
if (defined $reason) {
|
||||
@@ -32,35 +34,48 @@ sub cpart {
|
||||
}
|
||||
|
||||
# Set mode(s) on a channel.
|
||||
sub cmode {
|
||||
sub cmode
|
||||
{
|
||||
my ($svr, $chan, $modes) = @_;
|
||||
|
||||
Auto::socksnd($svr, "MODE $chan $modes");
|
||||
}
|
||||
|
||||
# Set mode(s) on us.
|
||||
sub umode {
|
||||
sub umode
|
||||
{
|
||||
my ($svr, $modes) = @_;
|
||||
|
||||
|
||||
}
|
||||
|
||||
# Send a PRIVMSG.
|
||||
sub privmsg {
|
||||
sub privmsg
|
||||
{
|
||||
my ($svr, $target, $message) = @_;
|
||||
|
||||
Auto::socksnd($svr, "PRIVMSG $target :$message");
|
||||
}
|
||||
|
||||
# Send a NOTICE.
|
||||
sub notice {
|
||||
sub notice
|
||||
{
|
||||
my ($svr, $target, $message) = @_;
|
||||
|
||||
Auto::socksnd($svr, "NOTICE $target :$message");
|
||||
}
|
||||
|
||||
# Change bot nickname.
|
||||
sub nick
|
||||
{
|
||||
my ($svr, $newnick) = @_;
|
||||
|
||||
Auto::socksnd($svr, "NICK $newnick");
|
||||
}
|
||||
|
||||
# Quit IRC.
|
||||
sub quit {
|
||||
sub quit
|
||||
{
|
||||
my ($svr, $reason) = @_;
|
||||
|
||||
if (defined $reason) {
|
||||
|
||||
Reference in new issue
Block a user