> a) thanks for the vote of confidence > b) i use it for finding multi-players from different ips > c) it's helpful for when people claim they forgot their password, cause if > the passwords are similar, it's most likely their char this code will make it so that no more than two characters with the same host name can log on..combine this with some ident code, then thjat should cure multiplaying since people will have either an individual ip, or a login name.. btw, are there any cases that would not fall under these two assumptions? siv here's my code: int check_multiplaying(char *hostname) { struct descriptor_data *d; int num_links = 0; if (!hostname || !*hostname) return 0; for (d = descriptor_list; d; d = d->next) { if (d->character) { if (GET_LEVEL(d->character) >= LVL_IMMORT) continue; else if (PLR_FLAGGED(d->character, PLR_MULTIOK)) continue; } if (!str_cmp(d->host, hostname)) num_links++; } if (num_links >= 2) return 0; return 1; } and the check is called from interpreter.c like so: ... if (isbanned(d->host) == BAN_SELECT && !PLR_FLAGGED(d->character, PLR_SITEOK)) { SEND_TO_Q("Sorry, this char has not been cleared for login from your site!\r\n", d); STATE(d) = CON_CLOSE; sprintf(buf, "Connection attempt for %s denied from %s", GET_NAME(d->character), d->host); mudlog(buf, NRM, LVL_IMPL, TRUE); return; } + if (!check_multiplaying(d->host) && (GET_LEVEL(d->character) < + LVL_IMMORT) + && !PLR_FLAGGED(d->character, PLR_MULTIOK)) { + SEND_TO_Q("Sorry, this char has not been cleared for + multi-playing!\r\n", d); + STATE(d) = CON_CLOSE; + sprintf(buf, "Connection attempt for %s denied from %s - + multi-play", + GET_NAME(d->character), d->host); + mudlog(buf, NRM, LVL_IMPL, TRUE); + return; + } +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST