ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/c_wiz.C
(Generate patch)

Comparing deliantra/server/server/c_wiz.C (file contents):
Revision 1.24 by root, Thu Dec 21 06:12:37 2006 UTC vs.
Revision 1.25 by root, Thu Dec 21 23:37:06 2006 UTC

67 if (pl->ob == op) 67 if (pl->ob == op)
68 { 68 {
69 new_draw_info (NDI_UNIQUE, 0, op, "You can't do that to yourself."); 69 new_draw_info (NDI_UNIQUE, 0, op, "You can't do that to yourself.");
70 return NULL; 70 return NULL;
71 } 71 }
72
72 if (pl->state != ST_PLAYING) 73 if (pl->ns->state != ST_PLAYING)
73 { 74 {
74 new_draw_info (NDI_UNIQUE, 0, op, "That player is in no state for that right now."); 75 new_draw_info (NDI_UNIQUE, 0, op, "That player is in no state for that right now.");
75 return NULL; 76 return NULL;
76 } 77 }
78
77 return pl; 79 return pl;
78} 80}
79 81
80/** 82/**
81 * Actually hides specified player (obviously a DM). 83 * Actually hides specified player (obviously a DM).
216 now = time (NULL); 218 now = time (NULL);
217 /* 219 /*
218 * Record this as a comment - then we don't have to worry about changing 220 * Record this as a comment - then we don't have to worry about changing
219 * the parsing code. 221 * the parsing code.
220 */ 222 */
221 fprintf (banishfile, "# %s (%s) banned by %s at %s\n", &pl->ob->name, pl->socket->host, &op->name, ctime (&now)); 223 fprintf (banishfile, "# %s (%s) banned by %s at %s\n", &pl->ob->name, pl->ns->host, &op->name, ctime (&now));
222 fprintf (banishfile, "*@%s\n", pl->socket->host); 224 fprintf (banishfile, "*@%s\n", pl->ns->host);
223 fclose (banishfile); 225 fclose (banishfile);
224 226
225 LOG (llevDebug, "! %s banned %s from IP: %s.\n", &op->name, &pl->ob->name, pl->socket->host); 227 LOG (llevDebug, "! %s banned %s from IP: %s.\n", &op->name, &pl->ob->name, pl->ns->host);
226 new_draw_info_format (NDI_UNIQUE | NDI_RED, 0, op, "You banish %s", &pl->ob->name); 228 new_draw_info_format (NDI_UNIQUE | NDI_RED, 0, op, "You banish %s", &pl->ob->name);
227 new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_RED, 5, op, "%s banishes %s from the land!", &op->name, &pl->ob->name); 229 new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_RED, 5, op, "%s banishes %s from the land!", &op->name, &pl->ob->name);
228 command_kick (op, (char *) &pl->ob->name); 230 command_kick (op, (char *) &pl->ob->name);
229 return 1; 231 return 1;
230} 232}
241 { 243 {
242 new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_RED, 5, op, "%s is kicked out of the game.", &op->name); 244 new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_RED, 5, op, "%s is kicked out of the game.", &op->name);
243 strcpy (op->contr->killer, "kicked"); 245 strcpy (op->contr->killer, "kicked");
244 } 246 }
245 247
246 pl->socket->destroy (); 248 pl->ns->destroy ();
247 } 249 }
248 250
249 return 1; 251 return 1;
250} 252}
251 253
1385 { 1387 {
1386 new_draw_info (NDI_UNIQUE, 0, op, "You are already the Dungeon Master!"); 1388 new_draw_info (NDI_UNIQUE, 0, op, "You are already the Dungeon Master!");
1387 return 0; 1389 return 0;
1388 } 1390 }
1389 1391
1390 if (checkdm (op, op->name, (params ? params : "*"), op->contr->socket->host)) 1392 if (checkdm (op, op->name, (params ? params : "*"), op->contr->ns->host))
1391 { 1393 {
1392 SET_FLAG (op, FLAG_WIZ); 1394 SET_FLAG (op, FLAG_WIZ);
1393 SET_FLAG (op, FLAG_WAS_WIZ); 1395 SET_FLAG (op, FLAG_WAS_WIZ);
1394 SET_FLAG (op, FLAG_WIZPASS); 1396 SET_FLAG (op, FLAG_WIZPASS);
1395 SET_FLAG (op, FLAG_WIZCAST); 1397 SET_FLAG (op, FLAG_WIZCAST);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines