Created
November 8, 2015 21:40
-
-
Save jonm/0ed8b12a116a4c3e6ee3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void do_users(struct char_data *ch, char *argument, int cmd) | |
{ | |
char buf[MAX_STRING_LENGTH], line[200], buf2[255]; | |
extern const char *connected_types[]; | |
struct descriptor_data *d; | |
strcpy(buf, "Connections:\n\r------------\n\r"); | |
for (d = descriptor_list; d; d = d->next){ | |
if (d->character && d->character->player.name){ | |
if(d->original) | |
sprintf(line, "%-16s: ", d->original->player.name); | |
else | |
sprintf(line, "%-16s: ", d->character->player.name); | |
} else | |
sprintf(line, "UNDEFINED : "); | |
if (d->host && *d->host) { | |
sprintf(buf2, "%-22s [%s]\n\r", connected_types[d->connected],d->host); | |
} else if(d) { | |
sprintf(buf2, "%-22s [%s]\n\r", connected_types[d->connected],"????"); | |
} else { | |
sprintf(buf2, "%-22s [%s]\n\r", "ACK, FIDO!", "booga"); | |
} | |
strcat(line, buf2); | |
strcat(buf, line); | |
} | |
send_to_char(buf, ch); | |
} | |
/* This is an excerpt from a DikuMUD-derived codebase. DikuMUD was created by Sebastian Hammer, Michael Seifert</a>, | |
Hans Henrik Stærfeldt, Tom Madsen, and Katja Nyboe. This code is subject to the DikuMud License, as found at | |
https://github.com/jonm/SillyMUD/blob/43344e6dc864de7518c2fc0dbf7b7cf14f5924a2/doc/license.doc | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment