comparison feeds.tcl @ 662:bb6aea76cdb4

feeds: Fix binds to actually work.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 20 Feb 2021 17:35:07 +0200
parents 179fc8150090
children 8bde8f798188
comparison
equal deleted inserted replaced
661:721c8cef5039 662:bb6aea76cdb4
297 proc feeds_cmd_pub {unick uhost uhand uchan uargs} { 297 proc feeds_cmd_pub {unick uhost uhand uchan uargs} {
298 global feeds_channels 298 global feeds_channels
299 299
300 foreach {ukey uvalue} [array get feeds_channels] { 300 foreach {ukey uvalue} [array get feeds_channels] {
301 if {[string match $ukey $uchan]} { 301 if {[string match $ukey $uchan]} {
302 return [feeds_cmd $unick $uhost $uhand $uchan $uargs 1] 302 feeds_cmd $unick $uhost $uhand $uchan $uargs 1
303 return 1
303 } 304 }
304 } 305 }
305 306
306 return 1 307 return 1
307 } 308 }
308 309
309 proc feeds_cmd_msg {unick uhost uhand uargs} { 310 proc feeds_cmd_msg {unick uhost uhand uargs} {
310 feeds_cmd $unick $uhost $uhand "PRIV" $uargs 0 311 feeds_cmd $unick $uhost $uhand "PRIV" $uargs 0
311 return 1 312 return 1
312 }
313
314
315 #-------------------------------------------------------------------------
316 proc feeds_cmdm_split {uargs} {
317 set rarglist [::textutil::split::splitx $uargs {\s+}]
318 return [join [lrange $rarglist 1 end] " "]
319 }
320
321
322 proc feeds_cmd_pubm {unick uhost uhand uchan uargs} {
323 return [feeds_cmd_pub $unick $uhost $uhand $uchan [feeds_cmdm_split $uargs]]
324 }
325
326
327 proc feeds_cmd_msgm {unick uhost uhand uargs} {
328 return [feeds_cmd_msg $unick $uhost $uhand [feeds_cmdm_split $uargs]]
329 } 313 }
330 314
331 315
332 #------------------------------------------------------------------------- 316 #-------------------------------------------------------------------------
333 # Script initialization 317 # Script initialization