- Cleaned up irc.c (moved variable declarations before code commants >.>)
- Updated the VC project files by Joshuaali. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5316 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
8563167d94
commit
b2382e76f7
@ -5,6 +5,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV
|
|||||||
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
|
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
|
||||||
|
|
||||||
2006/02/17
|
2006/02/17
|
||||||
|
* Cleaned up irc.c, may it compile now on Windows? [Skotlex]
|
||||||
|
* Updated the VC project files by Joshuaali. [Skotlex]
|
||||||
* Fixed possible crash on pet egg select. [Skotlex]
|
* Fixed possible crash on pet egg select. [Skotlex]
|
||||||
* Massive update on the way splash/area (non-ground) skills work. [Skotlex]
|
* Massive update on the way splash/area (non-ground) skills work. [Skotlex]
|
||||||
- the new column 'splash' in skill_db is now used to determine the area of
|
- the new column 'splash' in skill_db is now used to determine the area of
|
||||||
|
@ -78,8 +78,9 @@ void irc_announce(char *buf)
|
|||||||
|
|
||||||
void irc_announce_jobchange(struct map_session_data *sd)
|
void irc_announce_jobchange(struct map_session_data *sd)
|
||||||
{
|
{
|
||||||
nullpo_retv(sd);
|
|
||||||
char send_string[256];
|
char send_string[256];
|
||||||
|
|
||||||
|
nullpo_retv(sd);
|
||||||
memset(send_string,'\0',256);
|
memset(send_string,'\0',256);
|
||||||
|
|
||||||
sprintf(send_string,"PRIVMSG %s :%s has changed into a %s.",irc_channel,sd->status.name,job_name(sd->status.class_));
|
sprintf(send_string,"PRIVMSG %s :%s has changed into a %s.",irc_channel,sd->status.name,job_name(sd->status.class_));
|
||||||
@ -88,13 +89,13 @@ void irc_announce_jobchange(struct map_session_data *sd)
|
|||||||
|
|
||||||
void irc_announce_shop(struct map_session_data *sd, int flag)
|
void irc_announce_shop(struct map_session_data *sd, int flag)
|
||||||
{
|
{
|
||||||
nullpo_retv(sd);
|
|
||||||
|
|
||||||
char send_string[256];
|
char send_string[256];
|
||||||
char mapname[16];
|
char mapname[16];
|
||||||
|
int maplen = 0;
|
||||||
|
nullpo_retv(sd);
|
||||||
|
|
||||||
memset(send_string,'\0',256);
|
memset(send_string,'\0',256);
|
||||||
memset(mapname,'\0',16);
|
memset(mapname,'\0',16);
|
||||||
int maplen = 0;
|
|
||||||
|
|
||||||
if(flag){
|
if(flag){
|
||||||
strcpy(mapname, map[sd->bl.m].name);
|
strcpy(mapname, map[sd->bl.m].name);
|
||||||
@ -111,16 +112,16 @@ void irc_announce_shop(struct map_session_data *sd, int flag)
|
|||||||
|
|
||||||
void irc_announce_mvp(struct map_session_data *sd, struct mob_data *md)
|
void irc_announce_mvp(struct map_session_data *sd, struct mob_data *md)
|
||||||
{
|
{
|
||||||
|
char send_string[256];
|
||||||
|
char mapname[16];
|
||||||
|
int maplen = 0;
|
||||||
|
|
||||||
nullpo_retv(sd);
|
nullpo_retv(sd);
|
||||||
nullpo_retv(md);
|
nullpo_retv(md);
|
||||||
|
|
||||||
char send_string[256];
|
|
||||||
char mapname[16];
|
|
||||||
memset(send_string,'\0',256);
|
memset(send_string,'\0',256);
|
||||||
memset(mapname,'\0',16);
|
memset(mapname,'\0',16);
|
||||||
mapname[16]='\0';
|
mapname[16]='\0';
|
||||||
int maplen = 0;
|
|
||||||
|
|
||||||
strcpy(mapname, map[md->bl.m].name);
|
strcpy(mapname, map[md->bl.m].name);
|
||||||
maplen = strcspn(mapname,".");
|
maplen = strcspn(mapname,".");
|
||||||
mapname[maplen] = '\0';
|
mapname[maplen] = '\0';
|
||||||
@ -175,10 +176,11 @@ void irc_send_sub(int fd, char transmit[4096])
|
|||||||
|
|
||||||
void irc_send(char *buf)
|
void irc_send(char *buf)
|
||||||
{
|
{
|
||||||
|
char transmit[4096];
|
||||||
|
|
||||||
if(!irc_si || !session[irc_si->fd])
|
if(!irc_si || !session[irc_si->fd])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
char transmit[4096];
|
|
||||||
memset(transmit,'\0',4096);
|
memset(transmit,'\0',4096);
|
||||||
|
|
||||||
sprintf(transmit,buf);
|
sprintf(transmit,buf);
|
||||||
@ -196,6 +198,7 @@ void irc_parse_sub(int fd, char *incoming_string)
|
|||||||
char *source_ident=NULL;
|
char *source_ident=NULL;
|
||||||
char *source_host=NULL;
|
char *source_host=NULL;
|
||||||
char *state_mgr=NULL;
|
char *state_mgr=NULL;
|
||||||
|
|
||||||
memset(source,'\0',256);
|
memset(source,'\0',256);
|
||||||
memset(command,'\0',256);
|
memset(command,'\0',256);
|
||||||
memset(target,'\0',256);
|
memset(target,'\0',256);
|
||||||
@ -266,11 +269,12 @@ void do_final_irc(void)
|
|||||||
|
|
||||||
void do_init_irc(void)
|
void do_init_irc(void)
|
||||||
{
|
{
|
||||||
|
struct hostent *irc_hostname;
|
||||||
|
|
||||||
if(!use_irc)
|
if(!use_irc)
|
||||||
return;
|
return;
|
||||||
if (irc_ip_str[strlen(irc_ip_str)-1] == '\n')
|
if (irc_ip_str[strlen(irc_ip_str)-1] == '\n')
|
||||||
irc_ip_str[strlen(irc_ip_str)-1] = '\0';
|
irc_ip_str[strlen(irc_ip_str)-1] = '\0';
|
||||||
struct hostent *irc_hostname;
|
|
||||||
irc_hostname=gethostbyname(irc_ip_str);
|
irc_hostname=gethostbyname(irc_ip_str);
|
||||||
irc_ip_str[0]='\0';
|
irc_ip_str[0]='\0';
|
||||||
sprintf(irc_ip_str, "%d.%d.%d.%d", (unsigned char)irc_hostname->h_addr[0], (unsigned char)irc_hostname->h_addr[1],
|
sprintf(irc_ip_str, "%d.%d.%d.%d", (unsigned char)irc_hostname->h_addr[0], (unsigned char)irc_hostname->h_addr[1],
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
|
AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
|
||||||
PreprocessorDefinitions="WIN32;_WIN32;__WIN32;PCRE_SUPPORT;MAPREGSQL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;MAPREGSQL"
|
PreprocessorDefinitions="WIN32;_WIN32;__WIN32;PCRE_SUPPORT;MAPREGSQL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
|
||||||
GeneratePreprocessedFile="0"
|
GeneratePreprocessedFile="0"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
@ -129,7 +129,7 @@
|
|||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
OmitFramePointers="true"
|
OmitFramePointers="true"
|
||||||
AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
|
AdditionalIncludeDirectories="..\src\common;..\src\zlib;..\src\mysql"
|
||||||
PreprocessorDefinitions="WIN32;_WIN32;__WIN32;PCRE_SUPPORT;MAPREGSQL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION;MAPREGSQL"
|
PreprocessorDefinitions="WIN32;_WIN32;__WIN32;PCRE_SUPPORT;MAPREGSQL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;DB_MANUAL_CAST_TO_UNION"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
DefaultCharIsUnsigned="true"
|
DefaultCharIsUnsigned="true"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@ -262,6 +262,10 @@
|
|||||||
RelativePath="..\src\zlib\iowin32.c"
|
RelativePath="..\src\zlib\iowin32.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\src\map\irc.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\map\itemdb.c"
|
RelativePath="..\src\map\itemdb.c"
|
||||||
>
|
>
|
||||||
|
@ -264,6 +264,10 @@
|
|||||||
RelativePath="..\src\zlib\iowin32.c"
|
RelativePath="..\src\zlib\iowin32.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\src\map\irc.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\map\itemdb.c"
|
RelativePath="..\src\map\itemdb.c"
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user