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

Comparing deliantra/server/server/c_misc.C (file contents):
Revision 1.22 by root, Wed Dec 13 03:28:42 2006 UTC vs.
Revision 1.23 by root, Thu Dec 14 04:30:32 2006 UTC

1147} 1147}
1148 1148
1149int 1149int
1150command_real_quit (object *op, char *params) 1150command_real_quit (object *op, char *params)
1151{ 1151{
1152 send_query (&op->contr->socket, CS_QUERY_SINGLECHAR, "Quitting will delete your character.\nAre you sure you want to quit (y/n):"); 1152 send_query (op->contr->socket, CS_QUERY_SINGLECHAR, "Quitting will delete your character.\nAre you sure you want to quit (y/n):");
1153 1153
1154 op->contr->state = ST_CONFIRM_QUIT; 1154 op->contr->state = ST_CONFIRM_QUIT;
1155 return 1; 1155 return 1;
1156} 1156}
1157 1157
1183} 1183}
1184 1184
1185int 1185int
1186command_sound (object *op, char *params) 1186command_sound (object *op, char *params)
1187{ 1187{
1188 if (op->contr->socket.sound) 1188 if (op->contr->socket->sound)
1189 { 1189 {
1190 op->contr->socket.sound = 0; 1190 op->contr->socket->sound = 0;
1191 new_draw_info (NDI_UNIQUE, 0, op, "Silence is golden..."); 1191 new_draw_info (NDI_UNIQUE, 0, op, "Silence is golden...");
1192 } 1192 }
1193 else 1193 else
1194 { 1194 {
1195 op->contr->socket.sound = 1; 1195 op->contr->socket->sound = 1;
1196 new_draw_info (NDI_UNIQUE, 0, op, "The sounds are enabled."); 1196 new_draw_info (NDI_UNIQUE, 0, op, "The sounds are enabled.");
1197 } 1197 }
1198
1198 return 1; 1199 return 1;
1199} 1200}
1200 1201
1201/* Perhaps these should be in player.c, but that file is 1202/* Perhaps these should be in player.c, but that file is
1202 * already a bit big. 1203 * already a bit big.
1229 get_name (op); 1230 get_name (op);
1230 return; 1231 return;
1231 } 1232 }
1232 new_draw_info (NDI_UNIQUE, 0, op, " "); /* To hide the password better */ 1233 new_draw_info (NDI_UNIQUE, 0, op, " "); /* To hide the password better */
1233 1234
1234 if (checkbanned (op->name, op->contr->socket.host)) 1235 if (checkbanned (op->name, op->contr->socket->host))
1235 { 1236 {
1236 LOG (llevInfo, "Banned player tried to add: [%s@%s]\n", &op->name, op->contr->socket.host); 1237 LOG (llevInfo, "Banned player tried to add: [%s@%s]\n", &op->name, op->contr->socket->host);
1237 new_draw_info (NDI_UNIQUE | NDI_RED, 0, op, "You are not allowed to play."); 1238 new_draw_info (NDI_UNIQUE | NDI_RED, 0, op, "You are not allowed to play.");
1238 get_name (op); 1239 get_name (op);
1239 return; 1240 return;
1240 } 1241 }
1241 1242

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines