Added a subroutine to access the OPER command, I'm eventually going to build upon this to be a full API for oper commands
This commit is contained in:
1 parent
a587bab1c9
commit
4337f29d0a
1 file changed
+10
-1
+10
-1
@@ -38,7 +38,7 @@ sub on_connect
|
||||
# They don't exist - don't continue.
|
||||
return if !$u or !$p;
|
||||
# Send the OPER command.
|
||||
Auto::socksnd($svr, "OPER $u $p");
|
||||
oper($svr, $u, $p);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,15 @@ sub is_opered {
|
||||
return;
|
||||
}
|
||||
|
||||
# Start of the API
|
||||
|
||||
# Sends the OPER command to the specified server.
|
||||
sub oper {
|
||||
my ($svr, $user, $pass) = @_;
|
||||
Auto::socksnd($svr, "OPER $user $pass");
|
||||
return 1;
|
||||
}
|
||||
|
||||
# Start initialization.
|
||||
API::Std::mod_init('Oper', 'Xelhua', '1.01', '3.0.0a7', __PACKAGE__);
|
||||
# build: perl=5.010000
|
||||
|
||||
Reference in new issue
Block a user