Changeset 1245
- Timestamp:
- 09/08/08 17:01:58 (3 months ago)
- Files:
-
- 1.8.3/branches/devel/game/txt/hlp/pennchat.hlp (modified) (2 diffs)
- 1.8.3/branches/devel/src/extchat.c (modified) (1 diff)
- 1.8.3/branches/devel/src/function.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.3/branches/devel/game/txt/hlp/pennchat.hlp
r1225 r1245 348 348 or buffer size of <channel>, respectively. This information is 349 349 also displayed in @chan/list. 350 & CBUFFERADD() 351 cbufferadd(<channel>, <text>[, <spoof>]) 352 353 Adds text to a chan buffer without broadcasting it to all people on the 354 channel. In order to perform this, you must be able to peform an @nscemit. 350 355 & CWHO() 351 356 cwho(<channel>) … … 419 424 include their timestamps; otherwise, they will not. 420 425 421 See also: @channel3 426 See also: @channel3, cbufferadd() 422 427 & Channel functions 423 428 Channel functions work with the channel system. 424 429 425 cbuffer() c desc() cemit() cflags() channels()426 c lflags() clock() cmsgs() cowner() crecall()427 c status() ctitle() cusers() cwho()430 cbuffer() cbufferadd() cdesc() cemit() cflags() 431 channels() clflags() clock() cmsgs() cowner() 432 crecall() cstatus() ctitle() cusers() cwho() 1.8.3/branches/devel/src/extchat.c
r1231 r1245 2267 2267 } 2268 2268 2269 /* ARGSUSED */ 2270 FUNCTION(fun_cbufferadd) { 2271 CHAN *c; 2272 dbref victim; 2273 2274 // Person must be able to do nospoof cemits. 2275 if (!command_check_byname(executor, "@nscemit") || 2276 fun->flags & FN_NOSIDEFX) { 2277 safe_str(T(e_perm), buff, bp); 2278 return; 2279 } 2280 2281 // Find the channel. 2282 if (!args[0] || !*args[0]) { 2283 safe_str(T("#-1 NO CHANNEL GIVEN"), buff, bp); 2284 return; 2285 } 2286 2287 // Make sure we have text. 2288 if (!args[1] || !*args[1]) { 2289 safe_str(T("#-1 NO TEXT GIVEN"), buff, bp); 2290 return; 2291 } 2292 2293 victim = executor; 2294 // Do we spoof somebody else? 2295 if (nargs == 3) { 2296 if ((victim = noisy_match_result(executor, args[2], NOTYPE, MAT_EVERYTHING)) 2297 < 0) { 2298 safe_str(T(e_notvis), buff, bp); 2299 return; 2300 } 2301 } 2302 2303 // Get the message. 2304 switch (find_channel(args[0], &c, executor)) { 2305 case CMATCH_NONE: 2306 safe_str(T("#-1 NO SUCH CHANNEL"), buff, bp); 2307 return; 2308 case CMATCH_AMBIG: 2309 safe_str(T("#-1 AMBIGUOUS CHANNEL NAME"), buff, bp); 2310 return; 2311 default: 2312 if (ChanBufferQ(c) != NULL) { 2313 add_to_bufferq(ChanBufferQ(c), 0, victim, args[1]); 2314 } else { 2315 safe_str(T("#-1 CHANNEL DOES NOT HAVE A BUFFER"), buff, bp); 2316 } 2317 } 2318 } 2319 2269 2320 2270 2321 /* ARGSUSED */ 1.8.3/branches/devel/src/function.c
r1226 r1245 350 350 {"CAT", fun_cat, 1, INT_MAX, FN_REG}, 351 351 {"CBUFFER", fun_cinfo, 1, 1, FN_REG}, 352 {"CBUFFERADD", fun_cbufferadd, 2, 3, FN_REG}, 352 353 {"CDESC", fun_cinfo, 1, 1, FN_REG}, 353 354 {"CEMIT", fun_cemit, 2, 3, FN_REG},
