diff options
Diffstat (limited to 'vchat-commands.c')
-rwxr-xr-x | vchat-commands.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/vchat-commands.c b/vchat-commands.c index b3c955e..e4f1d99 100755 --- a/vchat-commands.c +++ b/vchat-commands.c | |||
@@ -26,6 +26,7 @@ | |||
26 | /* local includes */ | 26 | /* local includes */ |
27 | #include "vchat.h" | 27 | #include "vchat.h" |
28 | #include "vchat-help.h" | 28 | #include "vchat-help.h" |
29 | #include "vchat-user.h" | ||
29 | 30 | ||
30 | /* version of this module */ | 31 | /* version of this module */ |
31 | char *vchat_cm_version = "$Id$"; | 32 | char *vchat_cm_version = "$Id$"; |
@@ -155,14 +156,14 @@ static void | |||
155 | doaction( char *tail ) | 156 | doaction( char *tail ) |
156 | { | 157 | { |
157 | while( *tail == ' ' ) tail++; | 158 | while( *tail == ' ' ) tail++; |
158 | 159 | ||
159 | if( *tail ) { | 160 | if( *tail ) { |
160 | /* send users message to server */ | 161 | /* send users message to server */ |
161 | snprintf (tmpstr, TMPSTRSIZE, ".a %s", tail); | 162 | snprintf (tmpstr, TMPSTRSIZE, ".a %s", tail); |
162 | networkoutput (tmpstr); | 163 | networkoutput (tmpstr); |
163 | 164 | ||
164 | /* show action in channel window */ | 165 | /* show action in channel window */ |
165 | snprintf (tmpstr, TMPSTRSIZE, getformatstr(FS_TXPUBACTION), nick, tail); | 166 | snprintf (tmpstr, TMPSTRSIZE, getformatstr(FS_TXPUBACTION), own_nick_get(), tail); |
166 | writechan (tmpstr); | 167 | writechan (tmpstr); |
167 | } else { | 168 | } else { |
168 | /* missing action */ | 169 | /* missing action */ |
@@ -174,31 +175,31 @@ doaction( char *tail ) | |||
174 | static void | 175 | static void |
175 | privatemessagetx ( char *tail ) { | 176 | privatemessagetx ( char *tail ) { |
176 | char *mesg; | 177 | char *mesg; |
177 | 178 | ||
178 | /* find nick */ | 179 | /* find nick */ |
179 | while( *tail==' ') tail++; | 180 | while( *tail==' ') tail++; |
180 | 181 | ||
181 | /* find message */ | 182 | /* find message */ |
182 | mesg = tail; | 183 | mesg = tail; |
183 | while ( *mesg && *mesg!=' ') mesg++; | 184 | while ( *mesg && *mesg!=' ') mesg++; |
184 | 185 | ||
185 | /* check for nick && message */ | 186 | /* check for nick && message */ |
186 | if(*tail && *mesg) { | 187 | if(*tail && *mesg) { |
187 | 188 | ||
188 | /* terminate nick, move to rel start */ | 189 | /* terminate nick, move to rel start */ |
189 | *mesg++ = '\0'; | 190 | *mesg++ = '\0'; |
190 | 191 | ||
191 | /* form message and send to server */ | 192 | /* form message and send to server */ |
192 | snprintf (tmpstr, TMPSTRSIZE, ".m %s %s", tail, mesg); | 193 | snprintf (tmpstr, TMPSTRSIZE, ".m %s %s", tail, mesg); |
193 | networkoutput (tmpstr); | 194 | networkoutput (tmpstr); |
194 | 195 | ||
195 | /* show message in private window */ | 196 | /* show message in private window */ |
196 | snprintf (tmpstr, TMPSTRSIZE, getformatstr(FS_TXPRIVMSG), tail, mesg); | 197 | snprintf (tmpstr, TMPSTRSIZE, getformatstr(FS_TXPRIVMSG), tail, mesg); |
197 | writepriv (tmpstr, 0); | 198 | writepriv (tmpstr, 0); |
198 | 199 | ||
199 | /* note we messaged someone */ | 200 | /* note we messaged someone */ |
200 | ul_msgto(tail); | 201 | ul_private_action(tail); |
201 | 202 | ||
202 | } else { | 203 | } else { |
203 | /* Bump user to fill in missing parts */ | 204 | /* Bump user to fill in missing parts */ |
204 | msgout( *tail ? " Won't send empty message. ":" Recipient missing. " ); | 205 | msgout( *tail ? " Won't send empty message. ":" Recipient missing. " ); |
@@ -267,11 +268,11 @@ handleline (char *line) | |||
267 | static void | 268 | static void |
268 | output_default(char *line ) { | 269 | output_default(char *line ) { |
269 | /* prepare for output on display */ | 270 | /* prepare for output on display */ |
270 | snprintf (tmpstr, TMPSTRSIZE, getformatstr(FS_TXPUBMSG), nick, line); | 271 | snprintf (tmpstr, TMPSTRSIZE, getformatstr(FS_TXPUBMSG), own_nick_get(), line); |
271 | 272 | ||
272 | /* send original line to server */ | 273 | /* send original line to server */ |
273 | networkoutput (line); | 274 | networkoutput (line); |
274 | 275 | ||
275 | /* output message to channel window */ | 276 | /* output message to channel window */ |
276 | writechan (tmpstr); | 277 | writechan (tmpstr); |
277 | } | 278 | } |
@@ -282,7 +283,7 @@ command_user(char *tail) | |||
282 | { | 283 | { |
283 | while( *tail == ' ') tail++; | 284 | while( *tail == ' ') tail++; |
284 | if( *tail ) { | 285 | if( *tail ) { |
285 | char * out = ul_matchuser( tail); | 286 | char * out = ul_match_user( tail); |
286 | if( *out ) { | 287 | if( *out ) { |
287 | snprintf( tmpstr, TMPSTRSIZE, getformatstr(FS_USMATCH), tail, out); | 288 | snprintf( tmpstr, TMPSTRSIZE, getformatstr(FS_USMATCH), tail, out); |
288 | } else { | 289 | } else { |