/* Reject a client - WARNING: do not use auth instance after calling! */
void
-reject_client(struct auth_client *auth, provider_t id, const char *data, const char *reason)
+reject_client(struct auth_client *auth, provider_t id, const char *data, const char *fmt, ...)
{
char reject;
+ char buf[BUFSIZE];
+ va_list args;
switch(id)
{
if(data == NULL)
data = "*";
+ va_begin(fmt, args);
+ vsnprintf(buf, sizeof(buf), fmt, args);
+ va_end(args);
+
/* We send back username and hostname in case ircd wants to overrule our decision.
* In the future this may not be the case.
* --Elizafox
*/
- rb_helper_write(authd_helper, "R %x %c %s %s %s :%s", auth->cid, reject, auth->username, auth->hostname, data, reason);
+ rb_helper_write(authd_helper, "R %x %c %s %s %s :%s", auth->cid, reject, auth->username, auth->hostname, data, buf);
set_provider_off(auth, id);
cancel_providers(auth);
void provider_done(struct auth_client *auth, provider_t id);
void accept_client(struct auth_client *auth, provider_t id);
-void reject_client(struct auth_client *auth, provider_t id, const char *data, const char *reason);
+void reject_client(struct auth_client *auth, provider_t id, const char *data, const char *fmt, ...);
void handle_new_connection(int parc, char *parv[]);
void handle_cancel_connection(int parc, char *parv[]);