summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-11 20:16:55 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-11 20:16:55 +0000
commit792dfbb243bcbeee644bd096b7bd925a1e5c1e74 (patch)
treefa4735cd176917ba43883793fe215defe885220f /src/map/chrif.c
parentb9687899ece983642d2a83b4eee47a990a92cacc (diff)
downloadhercules-792dfbb243bcbeee644bd096b7bd925a1e5c1e74.tar.gz
hercules-792dfbb243bcbeee644bd096b7bd925a1e5c1e74.tar.bz2
hercules-792dfbb243bcbeee644bd096b7bd925a1e5c1e74.tar.xz
hercules-792dfbb243bcbeee644bd096b7bd925a1e5c1e74.zip
- Fixed clif_parse not checking for func_parse before sending data to the connected clients. This in turn required various code-rewrites in:
- duel related messaging functions (added clif targets DUEL/DUEL_WOS). - intif whisper to gm function - day/night timers - Rewrote the parse_console function to stop allocating/deallocating memory on every call. - Modified chrif_charselectreq to receive the player's ip among the data. - Added function clif_disp_message, which is the same as clif_disp_onlyself, except you can specify the targets (it sends a guild-chat packet) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7617 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r--src/map/chrif.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 3f3ecb10f..520ee4052 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -568,24 +568,15 @@ int auth_db_cleanup(int tid, unsigned int tick, int id, int data) {
*
*------------------------------------------
*/
-int chrif_charselectreq(struct map_session_data *sd)
+int chrif_charselectreq(struct map_session_data *sd, unsigned long s_ip)
{
- int i, s_ip;
-
nullpo_retr(-1, sd);
if( !sd || !sd->bl.id || !sd->login_id1 )
return -1;
chrif_check(-1);
- s_ip = 0;
- for(i = 0; i < fd_max; i++)
- if (session[i] && session[i]->session_data == sd) {
- s_ip = session[i]->client_addr.sin_addr.s_addr;
- break;
- }
-
- WFIFOHEAD(char_fd, 18);
+ WFIFOHEAD(char_fd, 18);
WFIFOW(char_fd, 0) = 0x2b02;
WFIFOL(char_fd, 2) = sd->bl.id;
WFIFOL(char_fd, 6) = sd->login_id1;