Re: [NEWBIE] [CODE] [MULTIPLAYING] at Jan 14, 99 10:15:08 am

From: Edoardo Spelta (espelta@goemon.polito.it)
Date: 01/14/99


>
> OK, I'm having a bit of a problem....  I wrote this to aid in my fight
> against mulitplaying.  What it does(or rather, supposed to do) is search
> the descriptor list, compare the ips of the current descriptor with that
> of the new one, and if they're equal, warn the player and close the other
> socket.  Now, I haven't been able to get this thing to work.  All the
> variables(chkmulti, warnplay, dc) are equal to 1, and set at the top of
> comm.c.  Anyone see anything that may be wrong?  In the log, it'll only
> display "Starting check of descriptor list".  Thanks in advance!
>
> -Phillip
>
>
>   /* Log new connections - probably unnecessary, but you may want it */
> if(chkmulti){
> sprintf(buf2, "New connection from [%s]", newd->host);
>           log("Starting check of descriptor list");
> for (d = descriptor_list; d; d = d->next)
>           if(str_cmp(d->host, newd->host) != 0){

Maybe i'm going to say something terribly stupid..but what is str_cmp ?
There is no ref in the man pages about this funct, i have used it once
because i mistyped 'strcmp' and the compiler didn't complain about it,
but nothing worked then...

>                   log("Not equal to 0");
>                   if(!PLR_FLAGGED(d->character, PLR_NOMLT)){
>       sprintf(buf3, "[**ALERT**] Multiple login detected.  Offending
> player: %s [%s].", GET_NAME(d->character), newd->host);
>         mudlog(buf2, BRF, LVL_IMMORT, FALSE);
>                 if(warnplay){
>             send_to_char("Multiple IP login detected.  You are in
> violation of the rules.\r\n", d->character);
>             }
>           if(dc){
>           log("Closing socket");
>                   CLOSE_SOCKET(desc);
>           }
>         }
>     }
>   }
>   mudlog(buf2, CMP, LVL_GOD, FALSE);
>
>
>
> Phillip Ames    | Satisfaction is not guaranteed.
> kirk47@juno.com | -Ferengi Rule of Acquisition #19
> ICQ: 8778335    | AOL IM: Grathol
> http://members.xoom.com/Gowron/index.html
>
> ___________________________________________________________________
> You don't need to buy Internet access to use free Internet e-mail.
> Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
> or call Juno at (800) 654-JUNO [654-5866]
>
>
>      +------------------------------------------------------------+
>      | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>      |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
>      +------------------------------------------------------------+
>


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST