Added hook on_preconnect, this comes before USER (after PASS).
This commit is contained in:
1 parent
4d966f89de
commit
fb6e64fa98
2 files changed
+3
No files matched your search
@@ -184,6 +184,7 @@ if (conf_get("module")) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
## Create sockets.
|
## Create sockets.
|
||||||
|
API::Std::event_add("on_preconnect");
|
||||||
alog "* Connecting to servers...";
|
alog "* Connecting to servers...";
|
||||||
dbug "* Connecting to servers...";
|
dbug "* Connecting to servers...";
|
||||||
# Get servers from config.
|
# Get servers from config.
|
||||||
@@ -207,6 +208,7 @@ foreach my $cskey (keys %cservers) {
|
|||||||
err(2, "Failed to connect to server: ".$cskey." [".$cservers{$cskey}{'host'}[0].":".$cservers{$cskey}{'port'}[0]."]", 0)
|
err(2, "Failed to connect to server: ".$cskey." [".$cservers{$cskey}{'host'}[0].":".$cservers{$cskey}{'port'}[0]."]", 0)
|
||||||
and next;
|
and next;
|
||||||
}
|
}
|
||||||
|
API::Std::event_run("on_preconnect");
|
||||||
# Send USER and NICK.
|
# Send USER and NICK.
|
||||||
socksnd($cskey, "USER ".$cservers{$cskey}{'ident'}[0]." * * :".$cservers{$cskey}{'realname'}[0]) or
|
socksnd($cskey, "USER ".$cservers{$cskey}{'ident'}[0]." * * :".$cservers{$cskey}{'realname'}[0]) or
|
||||||
err(2, "Failed to connect to server: ".$cskey." [".$cservers{$cskey}{'host'}[0].":".$cservers{$cskey}{'port'}[0]."]", 0)
|
err(2, "Failed to connect to server: ".$cskey." [".$cservers{$cskey}{'host'}[0].":".$cservers{$cskey}{'port'}[0]."]", 0)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log
|
|||||||
|
|
||||||
3.0 Indev
|
3.0 Indev
|
||||||
==================================================================
|
==================================================================
|
||||||
|
* Added hook on_preconnect, this comes before USER (after PASS).
|
||||||
* Added match_mask() to API::IRC and match_user() to API::Std,
|
* Added match_mask() to API::IRC and match_user() to API::Std,
|
||||||
match_user checks config user:mask to find a user block, if
|
match_user checks config user:mask to find a user block, if
|
||||||
a match is found, the configured username is returned.
|
a match is found, the configured username is returned.
|
||||||
|
|||||||
Reference in new issue
Block a user