summaryrefslogtreecommitdiff
path: root/src/map/irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/irc.c')
-rw-r--r--src/map/irc.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/map/irc.c b/src/map/irc.c
index 4722e9c2e..9989c3c31 100644
--- a/src/map/irc.c
+++ b/src/map/irc.c
@@ -63,7 +63,7 @@ int irc_connect_timer(int tid, unsigned int tick, int id, int data)
void irc_announce(char *buf)
{
char send_string[256];
- // malloc_tsetdword(send_string,'\0',256); // NOT REQUIRED
+ // memset(send_string,'\0',256); // NOT REQUIRED
sprintf(send_string,"PRIVMSG %s :",irc_channel);
strcat(send_string, buf);
@@ -75,7 +75,7 @@ void irc_announce_jobchange(struct map_session_data *sd)
char send_string[256];
nullpo_retv(sd);
- malloc_tsetdword(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_));
irc_send(send_string);
@@ -88,8 +88,8 @@ void irc_announce_shop(struct map_session_data *sd, int flag)
int maplen = 0;
nullpo_retv(sd);
- malloc_tsetdword(send_string,'\0',256);
- malloc_tsetdword(mapname,'\0',16);
+ memset(send_string,'\0',256);
+ memset(mapname,'\0',16);
if(flag){
strcpy(mapname, map[sd->bl.m].name);
@@ -113,8 +113,8 @@ void irc_announce_mvp(struct map_session_data *sd, struct mob_data *md)
nullpo_retv(sd);
nullpo_retv(md);
- malloc_tsetdword(send_string,'\0',256);
- malloc_tsetdword(mapname,'\0',16);
+ memset(send_string,'\0',256);
+ memset(mapname,'\0',16);
mapname[15]='\0'; // 15 is the final index, not 16 [Lance]
strcpy(mapname, map[md->bl.m].name);
maplen = strcspn(mapname,".");
@@ -156,7 +156,7 @@ int irc_parse(int fd)
int irc_keepalive_timer(int tid, unsigned int tick, int id, int data)
{
char send_string[128];
- malloc_tsetdword(send_string,'\0',128);
+ memset(send_string,'\0',128);
sprintf(send_string,"PRIVMSG %s : ", irc_nick);
irc_send(send_string);
@@ -179,7 +179,7 @@ void irc_send(char *buf)
if(!irc_si || !session[irc_si->fd])
return;
- malloc_tsetdword(transmit,'\0',4096);
+ memset(transmit,'\0',4096);
sprintf(transmit,buf);
irc_send_sub(irc_si->fd,transmit);
@@ -207,16 +207,16 @@ void irc_parse_sub(int fd, char *incoming_string)
struct map_session_data **allsd;
- malloc_tsetdword(source,'\0',256);
- malloc_tsetdword(command,'\0',256);
- malloc_tsetdword(target,'\0',256);
- malloc_tsetdword(message,'\0',8192);
- malloc_tsetdword(send_string,'\0',8192);
+ memset(source,'\0',256);
+ memset(command,'\0',256);
+ memset(target,'\0',256);
+ memset(message,'\0',8192);
+ memset(send_string,'\0',8192);
- malloc_tsetdword(cmd1,'\0',256);
- malloc_tsetdword(cmd2,'\0',256);
- malloc_tsetdword(cmdname,'\0',256);
- malloc_tsetdword(cmdargs,'\0',256);
+ memset(cmd1,'\0',256);
+ memset(cmd2,'\0',256);
+ memset(cmdname,'\0',256);
+ memset(cmdargs,'\0',256);
sscanf(incoming_string, ":%255s %255s %255s :%4095[^\r\n]", source, command, target, message);
if (source != NULL) {
@@ -371,11 +371,11 @@ int parse_names_packet(char *str) {
char channel[256];
char names[1024];
- malloc_tsetdword(source,'\0',256);
- malloc_tsetword(numeric,'\0',10);
- malloc_tsetdword(target,'\0',256);
- malloc_tsetdword(channel,'\0',256);
- malloc_tsetdword(names,'\0',1024);
+ memset(source,'\0',256);
+ memset(numeric,'\0',10);
+ memset(target,'\0',256);
+ memset(channel,'\0',256);
+ memset(names,'\0',1024);
tok=strtok(str,"\r\n");
sscanf(tok,":%255s %10s %255s %*1[=@] %255s :%1023[^\r\n]",source,numeric,target,channel,names);
@@ -478,7 +478,7 @@ int irc_rmnames() {
int i=0;
for(i=0;i<=MAX_CHANNEL_USERS;i++) {
- //malloc_tsetdword(cd.user[i].name,'\0',256);
+ //memset(cd.user[i].name,'\0',256);
cd.user[i].level=0;
}
@@ -495,10 +495,10 @@ int irc_read_conf(char *file) {
char path[256];
char row[1024];
- malloc_tsetdword(w1,'\0',256);
- malloc_tsetdword(w2,'\0',256);
- malloc_tsetdword(path,'\0',256);
- malloc_tsetdword(row,'\0',256);
+ memset(w1,'\0',256);
+ memset(w2,'\0',256);
+ memset(path,'\0',256);
+ memset(row,'\0',256);
sprintf(path,"conf/%s",file);