Added API::IRC::quit
This commit is contained in:
1 parent
78ed4d39c3
commit
0b8054cbae
2 files changed
+15
-2
No files matched your search
+1
-1
@@ -3,7 +3,7 @@ Auto IRC Bot 3.0: Change Log
|
|||||||
|
|
||||||
3.0 Indev
|
3.0 Indev
|
||||||
==================================================================
|
==================================================================
|
||||||
* Added mode, privmsg, and notice subroutine to API::IRC.
|
* Added mode, privmsg, notice, and quit subroutine to API::IRC.
|
||||||
* Added PASS support.
|
* Added PASS support.
|
||||||
* Bug fix: err() fatal errors now work. They didn't work
|
* Bug fix: err() fatal errors now work. They didn't work
|
||||||
due to bad regex.
|
due to bad regex.
|
||||||
|
|||||||
+14
-1
@@ -9,7 +9,7 @@ use warnings;
|
|||||||
use Exporter;
|
use Exporter;
|
||||||
|
|
||||||
our @ISA = qw(Exporter);
|
our @ISA = qw(Exporter);
|
||||||
our @EXPORT_OK = qw(cjoin cpart mode privmsg notice);
|
our @EXPORT_OK = qw(cjoin cpart mode privmsg notice quit);
|
||||||
|
|
||||||
|
|
||||||
# Join a channel.
|
# Join a channel.
|
||||||
@@ -51,3 +51,16 @@ sub notice {
|
|||||||
|
|
||||||
Auto::socksnd($svr, "NOTICE $target :$message");
|
Auto::socksnd($svr, "NOTICE $target :$message");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Quit IRC
|
||||||
|
sub quit {
|
||||||
|
my ($svr, $reason) = @_;
|
||||||
|
|
||||||
|
if (defined $reason) {
|
||||||
|
Auto::socksnd($svr, "QUIT :$reason");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Auto::socksnd($svr, "QUIT :Leaving");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Reference in new issue
Block a user