Crossfire Server, Branches 1.12
R18729
|
#include <global.h>
#include <loader.h>
#include <shstr.h>
#include <sproto.h>
#include <assert.h>
#include <sounds.h>
Go to the source code of this file.
Data Structures | |
struct | chars_names |
Functions | |
int | command_afk (object *op, char *params) |
int | command_applymode (object *op, char *params) |
int | command_archs (object *op, char *params) |
int | command_body (object *op, char *params) |
int | command_bowmode (object *op, char *params) |
int | command_brace (object *op, char *params) |
int | command_debug (object *op, char *params) |
int | command_dumpallarchetypes (object *op, char *params) |
int | command_dumpallmaps (object *op, char *params) |
int | command_dumpallobjects (object *op, char *params) |
int | command_dumpbelow (object *op, char *params) |
int | command_dumpfriendlyobjects (object *op, char *params) |
int | command_dumpmap (object *op, char *params) |
int | command_explore (object *op, char *params) |
int | command_fix_me (object *op, char *params) |
int | command_help (object *op, char *params) |
int | command_hiscore (object *op, char *params) |
int | command_kill_pets (object *op, char *params) |
int | command_language (object *op, char *params) |
int | command_listen (object *op, char *params) |
int | command_malloc (object *op, char *params) |
int | command_mapinfo (object *op, char *params) |
int | command_maps (object *op, char *params) |
int | command_motd (object *op, char *params) |
int | command_news (object *op, char *params) |
int | command_output_count (object *op, char *params) |
int | command_output_sync (object *op, char *params) |
int | command_passwd (object *pl, char *params) |
int | command_peaceful (object *op, char *params) |
int | command_petmode (object *op, char *params) |
int | command_players (object *op, char *params) |
int | command_printlos (object *op, char *params) |
int | command_quit (object *op, char *params) |
int | command_resistances (object *op, char *params) |
int | command_rules (object *op, char *params) |
int | command_save (object *op, char *params) |
int | command_showpets (object *op, char *params) |
int | command_sound (object *op, char *params) |
int | command_ssdumptable (object *op, char *params) |
int | command_statistics (object *pl, char *params) |
int | command_strings (object *op, char *params) |
int | command_time (object *op, char *params) |
int | command_title (object *op, char *params) |
int | command_usekeys (object *op, char *params) |
int | command_version (object *op, char *params) |
int | command_whereabouts (object *op, char *params) |
int | command_whereami (object *op, char *params) |
int | command_who (object *op, char *params) |
int | command_wimpy (object *op, char *params) |
int | command_wizcast (object *op, char *params) |
int | command_wizpass (object *op, char *params) |
void | current_map_info (object *op) |
void | current_region_info (object *op) |
void | display_who_entry (object *op, player *pl, const char *format) |
int | do_harvest (object *pl, int dir, object *skill) |
void | get_who_escape_code_value (char *return_val, int size, const char letter, player *pl) |
static void | help_topics (object *op, int what) |
void | list_players (object *op, region *reg, partylist *party) |
void | malloc_info (object *op) |
void | map_info (object *op, char *search) |
static int | name_cmp (const chars_names *c1, const chars_names *c2) |
int | onoff_value (const char *line) |
void | receive_player_name (object *op) |
void | receive_player_password (object *op) |
static void | show_commands (object *op, int what) |
Various functions. Handles misc. input request - things like hash table, malloc, maps, who, etc.
Definition in file c_misc.c.
int command_afk | ( | object * | op, |
char * | params | ||
) |
Toggles the afk status of a player. 'afk' command.
op | player to toggle status for. |
params | unused. |
Definition at line 795 of file c_misc.c.
References CLEAR_FLAG, draw_ext_info(), FLAG_AFK, get_language(), I18N_MSG_CMISC_056, I18N_MSG_CMISC_057, i18n_translate(), MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, NDI_UNIQUE, QUERY_FLAG, and SET_FLAG.
int command_applymode | ( | object * | op, |
char * | params | ||
) |
Players wants to change the apply mode, ie how to handle applying an item when no body slot available.
op | player asking for change. |
params | new mode. |
Definition at line 1443 of file c_misc.c.
References obj::contr, draw_ext_info_format(), get_language(), I18N_MSG_CMISC_132, I18N_MSG_CMISC_133, I18N_MSG_CMISC_134, I18N_MSG_CMISC_135, i18n_translate(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, NDI_UNIQUE, types, pl::unapply, unapply_always, unapply_never, and unapply_nochoice.
int command_archs | ( | object * | op, |
char * | params | ||
) |
Archetype-related statistics. Wizard 'archs' command.
op | player asking for information. |
params | unused. |
Definition at line 915 of file c_misc.c.
References arch_info().
int command_body | ( | object * | op, |
char * | params | ||
) |
This command dumps the body information for object *op. it doesn't care what the params are.
This is mostly meant as a debug command.
This is the 'body' command.
op | player to display body info for. |
params | unused |
1. |
Definition at line 157 of file c_misc.c.
References obj::body_info, body_locations, obj::body_used, draw_ext_info(), draw_ext_info_format(), FLAG_USE_ARMOUR, FLAG_USE_WEAPON, get_language(), I18N_MSG_CMISC_007, I18N_MSG_CMISC_008, I18N_MSG_CMISC_009, I18N_MSG_CMISC_010, I18N_MSG_CMISC_011, I18N_MSG_CMISC_012, I18N_MSG_CMISC_013, i18n_translate(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_BODY, NDI_UNIQUE, NUM_BODY_LOCATIONS, and QUERY_FLAG.
int command_bowmode | ( | object * | op, |
char * | params | ||
) |
Player wants to change the bowmode, how arrows are fired.
op | player asking for change. |
params | new mode. |
Definition at line 1491 of file c_misc.c.
References bow_bestarrow, bow_nw, pl::bowtype, obj::contr, draw_ext_info(), draw_ext_info_format(), get_language(), I18N_MSG_CMISC_136, I18N_MSG_CMISC_137, i18n_translate(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, NDI_UNIQUE, snprintf(), and types.
int command_brace | ( | object * | op, |
char * | params | ||
) |
Player toggles her braced status.
op | player. |
params | brace status (on/off). |
Definition at line 2382 of file c_misc.c.
References pl::braced, obj::contr, draw_ext_info(), fix_object(), get_language(), I18N_MSG_CMISC_212, I18N_MSG_CMISC_213, i18n_translate(), MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, NDI_UNIQUE, and onoff_value().
int command_debug | ( | object * | op, |
char * | params | ||
) |
Player wants to see/change the debug level.
op | player asking for information. |
params | new debug value. |
Definition at line 945 of file c_misc.c.
References Settings::debug, draw_ext_info(), draw_ext_info_format(), FABS, FLAG_WIZ, get_language(), I18N_MSG_CMISC_092, I18N_MSG_CMISC_093, I18N_MSG_CMISC_094, i18n_translate(), MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, NDI_UNIQUE, QUERY_FLAG, and settings.
int command_dumpallarchetypes | ( | object * | op, |
char * | params | ||
) |
Various archetypes-related statistics.
op | player asking for information. |
params | unused. |
Definition at line 1102 of file c_misc.c.
References dump_all_archetypes().
int command_dumpallmaps | ( | object * | op, |
char * | params | ||
) |
Various map-related statistics.
op | player asking for information. |
params | unused. |
Definition at line 1148 of file c_misc.c.
References dump_all_maps().
int command_dumpallobjects | ( | object * | op, |
char * | params | ||
) |
Various object-related statistics.
op | player asking for information. |
params | unused. |
Definition at line 1072 of file c_misc.c.
References dump_all_objects().
int command_dumpbelow | ( | object * | op, |
char * | params | ||
) |
Player wants to dump object below her.
op | player asking for information. |
params | unused. |
Definition at line 979 of file c_misc.c.
References obj::below, obj::contr, obj::count, dm_stack_push(), draw_ext_info(), dump_object(), MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, NDI_UNIQUE, stringbuffer_finish(), and stringbuffer_new().
int command_dumpfriendlyobjects | ( | object * | op, |
char * | params | ||
) |
Various friendly object-related statistics.
op | player asking for information. |
params | unused. |
Definition at line 1087 of file c_misc.c.
References dump_friendly_objects().
int command_dumpmap | ( | object * | op, |
char * | params | ||
) |
Various map-related statistics.
op | player asking for information. |
params | unused. |
Definition at line 1132 of file c_misc.c.
References dump_map(), and obj::map.
int command_explore | ( | object * | op, |
char * | params | ||
) |
Player wants to enter explore mode, that is never-dying mode.
Don't allow people to exit explore mode. It otherwise becomes really easy to abuse this.
op | player asking for explore mode. |
params | unused. |
Definition at line 2086 of file c_misc.c.
References obj::contr, draw_ext_info(), pl::explore, Settings::explore_mode, FALSE, first_player, get_language(), I18N_MSG_CMISC_182, I18N_MSG_CMISC_183, I18N_MSG_CMISC_184, I18N_MSG_CMISC_185, i18n_translate(), MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, NDI_UNIQUE, pl::next, and settings.
int command_fix_me | ( | object * | op, |
char * | params | ||
) |
Wrapper to fix a player.
op | player asking to be fixed. |
params | unused. |
Definition at line 1374 of file c_misc.c.
References fix_object(), and sum_weight().
int command_help | ( | object * | op, |
char * | params | ||
) |
Player is asking for some help.
op | player asking for information. |
params | what kind of help to ask for. |
Definition at line 1900 of file c_misc.c.
References Settings::datadir, draw_ext_info(), draw_ext_info_format(), FLAG_WIZ, get_language(), help_topics(), I18N_MSG_CMISC_178, I18N_MSG_CMISC_179, I18N_MSG_CMISC_180, i18n_translate(), language_codes, llevError, LOG(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, NDI_UNIQUE, QUERY_FLAG, S_ISREG, settings, show_commands(), snprintf(), and strerror_local().
int command_hiscore | ( | object * | op, |
char * | params | ||
) |
Player is asking for the hiscore.
op | player asking for information. |
params | unused. |
Definition at line 930 of file c_misc.c.
References display_high_score().
int command_kill_pets | ( | object * | op, |
char * | params | ||
) |
Player wants to get rid of pets.
op | player. |
params | unused. |
Definition at line 2410 of file c_misc.c.
References draw_ext_info(), draw_ext_info_format(), first_friendly_object, FLAG_REMOVED, free_object(), get_language(), get_owner(), I18N_MSG_CMISC_214, I18N_MSG_CMISC_215, I18N_MSG_CMISC_216, i18n_translate(), MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, obj::name, NDI_UNIQUE, oblnk::next, oblnk::ob, QUERY_FLAG, remove_friendly_object(), remove_ob(), strcasecmp(), and terminate_all_pets().
int command_language | ( | object * | op, |
char * | params | ||
) |
This is the 'language' command.
op | player requesting the information. |
params | optional language code ("en", "fr", etc.) |
Definition at line 97 of file c_misc.c.
References obj::contr, draw_ext_info_format(), get_language(), I18N_MSG_CMISC_005, I18N_MSG_CMISC_006, I18N_MSG_CMISC_051, i18n_translate(), pl::language, language_codes, language_names, MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, NDI_UNIQUE, and NUM_LANGUAGES.
int command_listen | ( | object * | op, |
char * | params | ||
) |
Change the player's listen level.
op | player asking for information. |
params | unused. |
Definition at line 1264 of file c_misc.c.
References obj::contr, draw_ext_info_format(), get_language(), I18N_MSG_CMISC_105, I18N_MSG_CMISC_106, I18N_MSG_CMISC_107, i18n_translate(), pl::listening, MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, and NDI_UNIQUE.
int command_malloc | ( | object * | op, |
char * | params | ||
) |
Display memory information.
op | player requesting information. |
params | unused. |
Definition at line 818 of file c_misc.c.
References malloc_info().
int command_mapinfo | ( | object * | op, |
char * | params | ||
) |
'mapinfo' command.
op | player requesting the information. |
params | unused. |
Definition at line 833 of file c_misc.c.
References current_map_info().
int command_maps | ( | object * | op, |
char * | params | ||
) |
'maps' command.
op | player requesting the information. |
params | region to restrict to. |
Definition at line 861 of file c_misc.c.
References map_info().
int command_motd | ( | object * | op, |
char * | params | ||
) |
Display the message of the day.
op | player requesting the motd. |
params | unused. |
1. |
Definition at line 203 of file c_misc.c.
References display_motd().
int command_news | ( | object * | op, |
char * | params | ||
) |
Display the server news.
op | player requesting the news. |
params | unused. |
1. |
Definition at line 233 of file c_misc.c.
References send_news().
int command_output_count | ( | object * | op, |
char * | params | ||
) |
output-count command.
op | player asking for information. |
params | new value. |
Definition at line 1230 of file c_misc.c.
References obj::contr, draw_ext_info(), draw_ext_info_format(), get_language(), I18N_MSG_CMISC_102, I18N_MSG_CMISC_103, I18N_MSG_CMISC_104, i18n_translate(), MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, NDI_UNIQUE, and pl::outputs_count.
int command_output_sync | ( | object * | op, |
char * | params | ||
) |
Output-sync command.
op | player asking for information. |
params | new value. |
Definition at line 1196 of file c_misc.c.
References obj::contr, draw_ext_info(), draw_ext_info_format(), get_language(), I18N_MSG_CMISC_099, I18N_MSG_CMISC_100, I18N_MSG_CMISC_101, i18n_translate(), MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, NDI_UNIQUE, and pl::outputs_sync.
int command_passwd | ( | object * | pl, |
char * | params | ||
) |
Player is asking to change password.
pl | player. |
params | unused. |
Definition at line 2454 of file c_misc.c.
References obj::contr, CS_QUERY_HIDEINPUT, get_language(), I18N_MSG_CMISC_217, i18n_translate(), send_query(), pl::socket, ST_CHANGE_PASSWORD_OLD, and pl::state.
int command_peaceful | ( | object * | op, |
char * | params | ||
) |
Player toggles her peaceful status.
op | player. |
params | unused. |
Definition at line 2333 of file c_misc.c.
References obj::contr, draw_ext_info(), get_language(), I18N_MSG_CMISC_208, I18N_MSG_CMISC_209, i18n_translate(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, NDI_UNIQUE, and pl::peaceful.
int command_petmode | ( | object * | op, |
char * | params | ||
) |
Player wants to change how her pets behave.
op | player asking for change. |
params | new mode. |
Definition at line 1556 of file c_misc.c.
References obj::contr, draw_ext_info_format(), get_language(), I18N_MSG_CMISC_138, I18N_MSG_CMISC_139, I18N_MSG_CMISC_140, i18n_translate(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, NDI_UNIQUE, pet_arena, pet_defend, pet_normal, pet_sad, pl::petmode, and types.
int command_players | ( | object * | op, |
char * | params | ||
) |
Display all known players.
op | player asking for information. |
params | unused. |
Definition at line 1390 of file c_misc.c.
References closedir(), dirent::d_name, draw_ext_info_format(), get_language(), I18N_MSG_CMISC_130, I18N_MSG_CMISC_131, i18n_translate(), Settings::localdir, MAX_BUF, MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, NDI_UNIQUE, opendir(), Settings::playerdir, readdir(), S_ISDIR, settings, and snprintf().
int command_printlos | ( | object * | op, |
char * | params | ||
) |
Various LOS-related statistics.
op | player asking for information. |
params | unused. |
Definition at line 1163 of file c_misc.c.
References print_los().
int command_quit | ( | object * | op, |
char * | params | ||
) |
Player wants to totally delete her character.
op | player wanting to delete her character. |
params | unused. |
Definition at line 2065 of file c_misc.c.
References obj::contr, CS_QUERY_SINGLECHAR, get_language(), I18N_MSG_CMISC_181, i18n_translate(), send_query(), pl::socket, ST_CONFIRM_QUIT, and pl::state.
int command_resistances | ( | object * | op, |
char * | params | ||
) |
Players wants to know her resistances.
op | player asking for information. |
params | unused. |
Definition at line 1740 of file c_misc.c.
References obj::arch, ATNR_INTERNAL, atnr_is_dragon_enabled(), attacktype_desc, obj::below, change_resist_msg, draw_ext_info(), draw_ext_info_format(), FORCE, get_language(), I18N_MSG_CMISC_168, I18N_MSG_CMISC_169, I18N_MSG_CMISC_170, I18N_MSG_CMISC_171, i18n_translate(), obj::inv, is_dragon_pl(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, archt::name, NDI_UNIQUE, NROFATTACKS, obj::resist, and obj::type.
int command_rules | ( | object * | op, |
char * | params | ||
) |
Display the server rules.
op | player requesting the rules. |
params | unused. |
1. |
Definition at line 218 of file c_misc.c.
References send_rules().
int command_save | ( | object * | op, |
char * | params | ||
) |
Player wants to get saved.
op | player. |
params | unused. |
Definition at line 2305 of file c_misc.c.
References draw_ext_info(), liv::exp, get_language(), get_map_flags(), I18N_MSG_CMISC_204, I18N_MSG_CMISC_205, I18N_MSG_CMISC_206, I18N_MSG_CMISC_207, i18n_translate(), obj::map, MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, NDI_UNIQUE, P_NO_CLERIC, save_player(), obj::stats, obj::x, and obj::y.
int command_showpets | ( | object * | op, |
char * | params | ||
) |
Players wants to know her pets.
op | player asking for information. |
params | unused. |
Definition at line 1606 of file c_misc.c.
References liv::ac, liv::Cha, liv::Con, liv::dam, liv::Dex, draw_ext_info(), draw_ext_info_format(), first_friendly_object, get_language(), get_owner(), liv::hp, I18N_MSG_CMISC_141, I18N_MSG_CMISC_142, I18N_MSG_CMISC_143, I18N_MSG_CMISC_144, I18N_MSG_CMISC_145, I18N_MSG_CMISC_146, I18N_MSG_CMISC_147, I18N_MSG_CMISC_148, I18N_MSG_CMISC_149, I18N_MSG_CMISC_150, I18N_MSG_CMISC_151, I18N_MSG_CMISC_152, I18N_MSG_CMISC_153, I18N_MSG_CMISC_154, I18N_MSG_CMISC_155, I18N_MSG_CMISC_156, I18N_MSG_CMISC_157, I18N_MSG_CMISC_158, I18N_MSG_CMISC_159, I18N_MSG_CMISC_160, I18N_MSG_CMISC_161, I18N_MSG_CMISC_162, I18N_MSG_CMISC_163, I18N_MSG_CMISC_164, i18n_translate(), liv::Int, obj::level, liv::maxhp, liv::maxsp, MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, obj::name, NDI_UNIQUE, oblnk::next, oblnk::ob, liv::Pow, liv::sp, obj::stats, liv::Str, liv::wc, and liv::Wis.
int command_sound | ( | object * | op, |
char * | params | ||
) |
Player wants to change sound status.
op | player asking for change. |
params | unused. |
Definition at line 2120 of file c_misc.c.
References obj::contr, draw_ext_info(), get_language(), I18N_MSG_CMISC_186, I18N_MSG_CMISC_187, i18n_translate(), MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, NDI_UNIQUE, SND_MUTE, pl::socket, and socket_struct::sound.
int command_ssdumptable | ( | object * | op, |
char * | params | ||
) |
Various string-related statistics.
op | player asking for information. |
params | unused. |
Definition at line 1117 of file c_misc.c.
References SS_DUMP_TABLE, and ss_dump_table().
int command_statistics | ( | object * | pl, |
char * | params | ||
) |
Prints out some useful information for the character. Everything we print out can be determined by the docs, so we aren't revealing anything extra - rather, we are making it convenient to find the values. params have no meaning here.
pl | player asking for information. |
params | unused. |
Definition at line 1300 of file c_misc.c.
References obj::arch, liv::Cha, archt::clone, liv::Con, obj::contr, liv::Dex, draw_ext_info(), draw_ext_info_format(), liv::exp, obj::expmul, get_language(), I18N_MSG_CMISC_108, I18N_MSG_CMISC_109, I18N_MSG_CMISC_110, I18N_MSG_CMISC_111, I18N_MSG_CMISC_112, I18N_MSG_CMISC_113, I18N_MSG_CMISC_114, I18N_MSG_CMISC_115, I18N_MSG_CMISC_116, I18N_MSG_CMISC_117, I18N_MSG_CMISC_118, I18N_MSG_CMISC_119, I18N_MSG_CMISC_120, I18N_MSG_CMISC_121, I18N_MSG_CMISC_122, I18N_MSG_CMISC_123, I18N_MSG_CMISC_124, I18N_MSG_CMISC_125, I18N_MSG_CMISC_126, I18N_MSG_CMISC_127, I18N_MSG_CMISC_128, I18N_MSG_CMISC_129, i18n_translate(), liv::Int, obj::level, level_exp(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_STATISTICS, NDI_UNIQUE, pl::orig_stats, pl::peaceful, liv::Pow, obj::stats, liv::Str, and liv::Wis.
int command_strings | ( | object * | op, |
char * | params | ||
) |
Various string-related statistics.
op | player asking for information. |
params | unused. |
Definition at line 876 of file c_misc.c.
References draw_ext_info(), draw_ext_info_format(), HUGE_BUF, MSG_TYPE_COMMAND, MSG_TYPE_LAST, NDI_UNIQUE, ss_dump_statistics(), ss_dump_table(), and SS_DUMP_TOTALS.
int command_time | ( | object * | op, |
char * | params | ||
) |
Players asks for the time.
op | player asking for information. |
params | unused. |
Definition at line 900 of file c_misc.c.
References time_info().
int command_title | ( | object * | op, |
char * | params | ||
) |
Player wishes to change her title.
op | player asking for change. |
params | new title. |
Definition at line 2250 of file c_misc.c.
References obj::contr, draw_ext_info(), FALSE, get_language(), I18N_MSG_CMISC_197, I18N_MSG_CMISC_198, I18N_MSG_CMISC_199, I18N_MSG_CMISC_200, I18N_MSG_CMISC_201, I18N_MSG_CMISC_202, I18N_MSG_CMISC_203, i18n_translate(), is_dragon_pl(), MAX_BUF, MAX_NAME, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, NDI_UNIQUE, pl::own_title, replace_unprintable_chars(), Settings::set_title, settings, snprintf(), and pl::title.
int command_usekeys | ( | object * | op, |
char * | params | ||
) |
Player wants to change how keys are used.
op | player asking for information. |
params | unused. |
Definition at line 1692 of file c_misc.c.
References containers, obj::contr, draw_ext_info_format(), get_language(), I18N_MSG_CMISC_165, I18N_MSG_CMISC_166, I18N_MSG_CMISC_167, i18n_translate(), key_inventory, keyrings, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, NDI_UNIQUE, types, and pl::usekeys.
int command_version | ( | object * | op, |
char * | params | ||
) |
int command_whereabouts | ( | object * | op, |
char * | params | ||
) |
'whereabouts' command.
Displays how many players are in which regions.
op | player requesting information. |
params | unused. |
Definition at line 482 of file c_misc.c.
References regiondef::counter, draw_ext_info(), draw_ext_info_format(), first_player, first_region, get_language(), get_region_by_map(), get_region_longname(), I18N_MSG_CMISC_049, I18N_MSG_CMISC_050, i18n_translate(), llevError, LOG(), regiondef::longname, obj::map, MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, regiondef::name, NDI_UNIQUE, pl::next, regiondef::next, pl::ob, and regiondef::parent.
int command_whereami | ( | object * | op, |
char * | params | ||
) |
'whereami' command.
op | player requesting the information. |
params | unused. |
Definition at line 848 of file c_misc.c.
References current_region_info().
int command_who | ( | object * | op, |
char * | params | ||
) |
'who' command.
op | player requesting the information. |
params | optional region to limit the information to. |
Definition at line 629 of file c_misc.c.
References get_region_from_string(), and list_players().
int command_wimpy | ( | object * | op, |
char * | params | ||
) |
Player wants to change how soon she'll flee.
op | player. |
params | new value. |
Definition at line 2353 of file c_misc.c.
References draw_ext_info_format(), get_language(), I18N_MSG_CMISC_210, I18N_MSG_CMISC_211, i18n_translate(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, NDI_UNIQUE, and obj::run_away.
int command_wizcast | ( | object * | op, |
char * | params | ||
) |
Wizard toggling "cast everywhere" ability.
op | player asking for information. |
params | unused. |
Definition at line 1039 of file c_misc.c.
References CLEAR_FLAG, draw_ext_info(), FLAG_WIZCAST, get_language(), I18N_MSG_CMISC_097, I18N_MSG_CMISC_098, i18n_translate(), MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, NDI_UNIQUE, onoff_value(), QUERY_FLAG, and SET_FLAG.
int command_wizpass | ( | object * | op, |
char * | params | ||
) |
Wizard toggling wall-crossing.
op | player asking for information. |
params | unused. |
Definition at line 1006 of file c_misc.c.
References CLEAR_FLAG, draw_ext_info(), FLAG_WIZPASS, get_language(), I18N_MSG_CMISC_095, I18N_MSG_CMISC_096, i18n_translate(), MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, NDI_UNIQUE, onoff_value(), QUERY_FLAG, and SET_FLAG.
void current_map_info | ( | object * | op | ) |
'mapinfo' command.
op | player requesting the information. |
Definition at line 421 of file c_misc.c.
References mapdef::difficulty, draw_ext_info(), draw_ext_info_format(), FLAG_WIZ, get_language(), get_region_by_map(), get_region_longname(), I18N_MSG_CMISC_046, i18n_translate(), obj::map, MAP_ENTER_X, MAP_ENTER_Y, MAP_HEIGHT, MAP_TIMEOUT, MAP_WIDTH, mapdef::msg, MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, mapdef::name, NDI_UNIQUE, mapdef::path, mapdef::players, and QUERY_FLAG.
Referenced by command_mapinfo().
void current_region_info | ( | object * | op | ) |
'whereami' command.
Pretty much identical to current map_info(), but on a bigger scale
This function returns the name of the players current region, and a description of it. It is there merely for flavour text.
op | player wanting information. |
Definition at line 398 of file c_misc.c.
References draw_ext_info_format(), get_language(), get_name_of_region_for_map(), get_region_by_name(), get_region_longname(), get_region_msg(), I18N_MSG_CMISC_045, i18n_translate(), obj::map, MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, and NDI_UNIQUE.
Referenced by command_whereami().
Display a line of 'who' to op, about pl, using the formatting specified by format.
op | player getting the information. |
pl | player to display information for. |
format | format to display. |
Definition at line 648 of file c_misc.c.
References draw_ext_info(), get_who_escape_code_value(), llevError, LOG(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_WHO, NDI_UNIQUE, and snprintf().
Referenced by list_players().
Player is trying to harvest something.
pl | player trying to harvest. |
dir | direction. |
skill | skill being used. |
Definition at line 2472 of file c_misc.c.
References obj::above, obj::below, change_exp(), obj::chosen_skill, copy_object_with_inv(), draw_ext_info_format(), find_free_spot(), FLAG_MONSTER, freearr_x, freearr_y, get_map_flags(), GET_MAP_OB, get_ob_key_value(), get_object(), insert_ob_in_map(), insert_ob_in_ob(), obj::inv, obj::level, llevError, LOG(), obj::map, MSG_TYPE_SKILL, MSG_TYPE_SKILL_FAILURE, obj::name, NDI_WHITE, P_OUT_OF_MAP, PLAYER, QUERY_FLAG, random_roll(), remove_ob(), rndm(), set_ob_key_value(), SIZEOFFREE, SK_EXP_ADD_SKILL, obj::skill, obj::slaying, obj::speed, obj::speed_left, obj::type, obj::x, and obj::y.
Referenced by do_skill().
void get_who_escape_code_value | ( | char * | return_val, |
int | size, | ||
const char | letter, | ||
player * | pl | ||
) |
Returns the value of the escape code used in the who format specifier.
Specifier values are:
[out] | return_val | buffer that will contain the information. |
size | length of return_val. | |
letter | format specifier. | |
pl | player to get information for. |
Definition at line 709 of file c_misc.c.
References obj::count, FLAG_AFK, FLAG_WIZ, get_name_of_region_for_map(), get_region_by_map(), get_region_longname(), socket_struct::host, socket_struct::is_bot, obj::level, obj::map, obj::name, mapdef::name, pl::ob, pl::own_title, mapdef::path, pl::peaceful, QUERY_FLAG, snprintf(), pl::socket, and pl::title.
Referenced by display_who_entry().
|
static |
Player wants to know available help topics.
op | player asking for information. |
what |
|
Definition at line 1791 of file c_misc.c.
References closedir(), dirent::d_name, Settings::datadir, draw_ext_info(), get_language(), HUGE_BUF, I18N_MSG_CMISC_172, I18N_MSG_CMISC_173, I18N_MSG_CMISC_174, i18n_translate(), language_codes, MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, NAMLEN, NDI_UNIQUE, opendir(), readdir(), settings, and snprintf().
Referenced by command_help().
Displays the players in a region or party. If both are NULL, all players are listed.
op | who is asking for player list. |
reg | region to display players of. |
party | party to list. |
Definition at line 550 of file c_misc.c.
References display_who_entry(), draw_ext_info(), draw_ext_info_format(), find_player(), first_player, FLAG_AFK, FLAG_WIZ, get_language(), get_region_by_map(), pl::hidden, I18N_MSG_CMISC_052, I18N_MSG_CMISC_053, I18N_MSG_CMISC_054, I18N_MSG_CMISC_055, i18n_translate(), socket_struct::is_bot, chars_names::login_order, regiondef::longname, obj::map, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_WHO, obj::name, regiondef::name, name_cmp(), NDI_UNIQUE, pl::next, pl::ob, pl::party, party_struct::partyname, QUERY_FLAG, region_is_child_of_region(), settings, pl::socket, ST_GET_PARTY_PASSWORD, ST_PLAYING, pl::state, Settings::who_format, and Settings::who_wiz_format.
Referenced by command_party(), and command_who().
void malloc_info | ( | object * | op | ) |
Sends various memory-related statistics.
op | player requesting the information. |
Definition at line 244 of file c_misc.c.
References animations, count_active(), count_free(), count_used(), draw_ext_info_format(), first_archetype, first_artifactlist, first_map, first_player, first_treasurelist, get_language(), I18N_MSG_CMISC_014, I18N_MSG_CMISC_015, I18N_MSG_CMISC_016, I18N_MSG_CMISC_017, I18N_MSG_CMISC_018, I18N_MSG_CMISC_019, I18N_MSG_CMISC_020, I18N_MSG_CMISC_021, I18N_MSG_CMISC_022, I18N_MSG_CMISC_023, I18N_MSG_CMISC_024, I18N_MSG_CMISC_025, I18N_MSG_CMISC_026, I18N_MSG_CMISC_027, I18N_MSG_CMISC_028, I18N_MSG_CMISC_029, I18N_MSG_CMISC_030, I18N_MSG_CMISC_031, I18N_MSG_CMISC_032, I18N_MSG_CMISC_033, I18N_MSG_CMISC_034, I18N_MSG_CMISC_035, I18N_MSG_CMISC_036, I18N_MSG_CMISC_037, I18N_MSG_CMISC_038, I18N_MSG_CMISC_039, I18N_MSG_CMISC_040, I18N_MSG_CMISC_041, I18N_MSG_CMISC_042, I18N_MSG_CMISC_043, I18N_MSG_CMISC_044, i18n_translate(), mapdef::in_memory, MAP_HEIGHT, MAP_IN_MEMORY, MAP_WIDTH, archt::more, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, NDI_UNIQUE, artifactliststruct::next, treasureliststruct::next, pl::next, archt::next, mapdef::next, nrofallowedstr, nrofartifacts, nroftreasures, and num_animations.
Referenced by command_malloc().
void map_info | ( | object * | op, |
char * | search | ||
) |
This is the 'maps' command.
op | player requesting the information. |
search | optional substring to search for. |
Definition at line 55 of file c_misc.c.
References mapdef::difficulty, draw_ext_info(), draw_ext_info_format(), FALSE, first_map, get_language(), I18N_MSG_CMISC_000, I18N_MSG_CMISC_001, I18N_MSG_CMISC_002, I18N_MSG_CMISC_003, I18N_MSG_CMISC_004, i18n_translate(), mapdef::in_memory, MAP_WHEN_RESET, MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MAPS, NDI_UNIQUE, mapdef::next, mapdef::path, mapdef::players, players_on_map(), seconds(), and mapdef::timeout.
Referenced by command_maps().
|
static |
Local function for qsort comparison.
c1 | |
c2 | players to compare. |
Definition at line 536 of file c_misc.c.
References chars_names::namebuf, and strcasecmp().
Referenced by list_players().
int onoff_value | ( | const char * | line | ) |
Utility function to convert a reply to a yes/no or on/off value.
line | string to check. |
1 | line is one of on y k s d. |
0 | other value. |
Definition at line 2026 of file c_misc.c.
Referenced by command_brace(), command_wizcast(), and command_wizpass().
void receive_player_name | ( | object * | op | ) |
A player just entered her name.
Perhaps these should be in player.c, but that file is already a bit big.
op | player we're getting the name of. |
Definition at line 2142 of file c_misc.c.
References check_name(), obj::contr, draw_ext_info(), FREE_AND_COPY, get_name(), get_password(), MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, obj::name, pl::name_changed, obj::name_pl, NDI_UNIQUE, and pl::write_buf.
Referenced by reply_cmd().
void receive_player_password | ( | object * | op | ) |
A player just entered her password, including for changing it.
op | player. |
Definition at line 2160 of file c_misc.c.
References check_login(), check_password(), checkbanned(), obj::contr, crypt_string(), CS_QUERY_HIDEINPUT, display_motd(), draw_ext_info(), get_language(), get_name(), socket_struct::host, I18N_MSG_CMISC_188, I18N_MSG_CMISC_189, I18N_MSG_CMISC_190, I18N_MSG_CMISC_191, I18N_MSG_CMISC_192, I18N_MSG_CMISC_193, I18N_MSG_CMISC_194, I18N_MSG_CMISC_195, I18N_MSG_CMISC_196, i18n_translate(), llevInfo, LOG(), MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, obj::name, NDI_RED, NDI_UNIQUE, pl::new_password, pl::password, roll_again(), send_query(), pl::socket, ST_CHANGE_PASSWORD_CONFIRM, ST_CHANGE_PASSWORD_NEW, ST_CHANGE_PASSWORD_OLD, ST_CONFIRM_PASSWORD, ST_PLAYING, ST_ROLL_STAT, pl::state, and pl::write_buf.
Referenced by reply_cmd().
|
static |
Helper function to display commands.
op | player asking for information. |
what |
|
Definition at line 1852 of file c_misc.c.
References Commands, CommandsSize, CommunicationCommands, CommunicationCommandSize, draw_ext_info(), get_language(), HUGE_BUF, I18N_MSG_CMISC_175, I18N_MSG_CMISC_176, I18N_MSG_CMISC_177, i18n_translate(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, NDI_UNIQUE, WizCommands, and WizCommandsSize.
Referenced by command_help().