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.25 by root, Wed Dec 20 09:14:22 2006 UTC vs.
Revision 1.26 by root, Thu Dec 21 23:37:05 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->ns, 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->ns->state = ST_CONFIRM_QUIT;
1155 return 1; 1155 return 1;
1156} 1156}
1157 1157
1158/* 1158/*
1159 * don't allow people to exit explore mode. It otherwise becomes 1159 * don't allow people to exit explore mode. It otherwise becomes
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->ns->sound)
1189 { 1189 {
1190 op->contr->socket->sound = 0; 1190 op->contr->ns->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->ns->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
1199 return 1; 1199 return 1;
1200} 1200}
1230 get_name (op); 1230 get_name (op);
1231 return; 1231 return;
1232 } 1232 }
1233 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 */
1234 1234
1235 if (checkbanned (op->name, op->contr->socket->host)) 1235 if (checkbanned (op->name, op->contr->ns->host))
1236 { 1236 {
1237 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->ns->host);
1238 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.");
1239 get_name (op); 1239 get_name (op);
1240 return; 1240 return;
1241 } 1241 }
1242 1242
1243 if (op->contr->state == ST_CONFIRM_PASSWORD) 1243 if (op->contr->ns->state == ST_CONFIRM_PASSWORD)
1244 { 1244 {
1245 if (!check_password (op->contr->write_buf + 1, op->contr->password)) 1245 if (!check_password (op->contr->write_buf + 1, op->contr->password))
1246 { 1246 {
1247 new_draw_info (NDI_UNIQUE, 0, op, "The passwords did not match."); 1247 new_draw_info (NDI_UNIQUE, 0, op, "The passwords did not match.");
1248 get_name (op); 1248 get_name (op);
1252 display_motd (op); 1252 display_motd (op);
1253 new_draw_info (NDI_UNIQUE, 0, op, " "); 1253 new_draw_info (NDI_UNIQUE, 0, op, " ");
1254 new_draw_info (NDI_UNIQUE, 0, op, "Welcome, Brave New Warrior!"); 1254 new_draw_info (NDI_UNIQUE, 0, op, "Welcome, Brave New Warrior!");
1255 new_draw_info (NDI_UNIQUE, 0, op, " "); 1255 new_draw_info (NDI_UNIQUE, 0, op, " ");
1256 Roll_Again (op); 1256 Roll_Again (op);
1257 op->contr->state = ST_ROLL_STAT; 1257 op->contr->ns->state = ST_ROLL_STAT;
1258 return; 1258 return;
1259 } 1259 }
1260 strcpy (op->contr->password, crypt_string (op->contr->write_buf + 1, NULL)); 1260 strcpy (op->contr->password, crypt_string (op->contr->write_buf + 1, NULL));
1261 op->contr->state = ST_ROLL_STAT; 1261 op->contr->ns->state = ST_ROLL_STAT;
1262 check_login (op); 1262 check_login (op);
1263 return; 1263 return;
1264} 1264}
1265 1265
1266 1266

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines