diff options
author | erdgeist <> | 2012-02-27 00:45:39 +0000 |
---|---|---|
committer | erdgeist <> | 2012-02-27 00:45:39 +0000 |
commit | 42c4f4799a66f148166262b3993b2374045a9f24 (patch) | |
tree | 9eaf5d8073675531ec813ab59ddbe9cacffa9483 | |
parent | 4bd734a4acaf656a3acf16fce0c0cc3ef6e7f155 (diff) |
Only use nicknames once they're zero terminated ;)
-rwxr-xr-x | vchat-protocol.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vchat-protocol.c b/vchat-protocol.c index 55c8b55..b9a5e15 100755 --- a/vchat-protocol.c +++ b/vchat-protocol.c | |||
@@ -209,12 +209,12 @@ pubaction (char *message) | |||
209 | nick = strchr (message, ' '); | 209 | nick = strchr (message, ' '); |
210 | nick[0] = '\0'; | 210 | nick[0] = '\0'; |
211 | nick++; | 211 | nick++; |
212 | ul_public_action(nick); | ||
213 | 212 | ||
214 | action = strchr (nick, ' '); | 213 | action = strchr (nick, ' '); |
215 | action[0] = '\0'; | 214 | action[0] = '\0'; |
216 | action++; | 215 | action++; |
217 | 216 | ||
217 | ul_public_action(nick); | ||
218 | snprintf(tmpstr,TMPSTRSIZE,getformatstr(FS_PUBACTION),nick,action); | 218 | snprintf(tmpstr,TMPSTRSIZE,getformatstr(FS_PUBACTION),nick,action); |
219 | writechan (tmpstr); | 219 | writechan (tmpstr); |
220 | } | 220 | } |
@@ -230,12 +230,12 @@ pubthoughts (char *message) | |||
230 | nick = strchr (message, ' '); | 230 | nick = strchr (message, ' '); |
231 | nick[0] = '\0'; | 231 | nick[0] = '\0'; |
232 | nick++; | 232 | nick++; |
233 | ul_public_action(nick); | ||
234 | 233 | ||
235 | thoughts = strchr (nick, ' '); | 234 | thoughts = strchr (nick, ' '); |
236 | thoughts[0] = '\0'; | 235 | thoughts[0] = '\0'; |
237 | thoughts++; | 236 | thoughts++; |
238 | 237 | ||
238 | ul_public_action(nick); | ||
239 | snprintf(tmpstr,TMPSTRSIZE,getformatstr(FS_PUBTHOUGHT),nick,thoughts); | 239 | snprintf(tmpstr,TMPSTRSIZE,getformatstr(FS_PUBTHOUGHT),nick,thoughts); |
240 | writechan (tmpstr); | 240 | writechan (tmpstr); |
241 | } | 241 | } |
@@ -316,7 +316,6 @@ topicchange (char *message) | |||
316 | /* search start of nickname */ | 316 | /* search start of nickname */ |
317 | nick = strchr (message, ' '); | 317 | nick = strchr (message, ' '); |
318 | nick++; | 318 | nick++; |
319 | ul_public_action(nick); | ||
320 | 319 | ||
321 | /* search start of message before topic, terminate nick */ | 320 | /* search start of message before topic, terminate nick */ |
322 | topic = strchr (nick, ' '); | 321 | topic = strchr (nick, ' '); |
@@ -333,6 +332,7 @@ topicchange (char *message) | |||
333 | if (topic[len-1] == '\'') | 332 | if (topic[len-1] == '\'') |
334 | topic[len-1] = '\0'; | 333 | topic[len-1] = '\0'; |
335 | 334 | ||
335 | ul_public_action(nick); | ||
336 | /* show change in topic window */ | 336 | /* show change in topic window */ |
337 | snprintf (topicstr, TOPICSTRSIZE, getformatstr(FS_TOPICW), ownchan, topic); | 337 | snprintf (topicstr, TOPICSTRSIZE, getformatstr(FS_TOPICW), ownchan, topic); |
338 | topicline(NULL); | 338 | topicline(NULL); |