crypted = ircd_crypt(to_match, passwd);
if(!crypted)
return 0;
- Debug((DEBUG_NOTICE, "WebIRC: Passwort check: %s = %s", crypted, passwd));
res = strcmp(crypted, passwd);
MyFree(crypted);
return 0 == res;
unsigned int matched = 0;
if(!GlobalWebIRCConf) {
- Debug((DEBUG_NOTICE, "WebIRC: no global webirc conf"));
return NULL;
}
/* it's a sorted list an passwords are stored first! */
if(inode->type != WEBIRC_PASS) break;
- Debug((DEBUG_NOTICE, "WebIRC: pass: %s",inode->content));
if(webirc_pwmatch(passwd, inode->content)) {
matched = 1;
break;
/* go to next entry */
inode = inode->next;
- if(!matched)
- Debug((DEBUG_NOTICE, "WebIRC: Password missmatch"));
-
/* check for matching real-host/ip */
if(matched) {
matched = 0;
inode = inode->next;
} while(inode != iter->list);
- if(!matched)
- Debug((DEBUG_NOTICE, "WebIRC: host missmatch"));
}
/* check for matching spoofed host/ip */
inode = inode->next;
} while(inode != iter->list);
- if(!matched)
- Debug((DEBUG_NOTICE, "WebIRC: spoof missmatch"));
}
if(matched) return iter;
*
* parv[0] = sender prefix
* parv[1] = password
- * parv[2] = "cgiirc"
+ * parv[2] = "cgiirc" (ignored)
* parv[3] = hostname
* parv[4] = ip
*/
if(parc < 5)
return need_more_params(sptr, "WEBIRC");
- if(strcmp(parv[2], "cgiirc")) {
- if(feature_bool(FEAT_WEBIRC_REJECT)) {
- IPcheck_connect_fail(sptr);
- return exit_client(cptr, sptr, &me, "WebIRC protocol violation (p2).");
- }
- else {
- len = sprintf(webirc_buf, "NOTICE %s :%sWebIRC protocol violation (p2).\r\n", nick, auth ? "*** " : "");
- webirc_resp(sptr, webirc_buf, len);
- return 0; /* continue with normal authentication */
- }
- }
-
/* created ip in dotted notation */
con_addr = ircd_ntoa(&(cli_ip(sptr)));
if(0 == ipmask_parse(parv[4], &addr, NULL)) {