BT.H.tcl 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183
  1. #########################################################################
  2. ## BlackTools - The Ultimate Channel Control Script ##
  3. ## One TCL. One smart Eggdrop ##
  4. #########################################################################
  5. ############################# HCMDS TCL #############################
  6. #########################################################################
  7. ## ##
  8. ## BlackTools : http://blacktools.tclscripts.net ##
  9. ## Bugs report : http://www.tclscripts.net/ ##
  10. ## Online Help : irc://irc.undernet.org/tcl-help ##
  11. ## #TCL-HELP / UnderNet ##
  12. ## You can ask in english or romanian ##
  13. ## ##
  14. #########################################################################
  15. proc h:process {nick host hand chan chan1 command type} {
  16. global black botnick config lastbind
  17. if {[matchattr $hand q]} { blacktools:tell $nick $host $hand $chan $chan1 gl.glsuspend none
  18. return
  19. }
  20. if {[matchattr $hand -|q $chan]} { blacktools:tell $nick $host $hand $chan $chan1 gl.suspend none
  21. return
  22. }
  23. set cmd_status [btcmd:status $chan $hand "h" 0]
  24. if {$cmd_status == "1"} {
  25. return
  26. }
  27. set number [scan $black(antiflood:cmd) %\[^:\]]
  28. set timer [scan $black(antiflood:cmd) %*\[^:\]:%s]
  29. set split_lastbind [split $lastbind ""]
  30. set charbind [lindex $split_lastbind 0]
  31. if {[lsearch -exact $black(cmdchar) $charbind] < 0} {
  32. set charbind ""
  33. }
  34. set replace(%botnick%) $botnick
  35. if {[string equal $lastbind "*"]} { set charbind "" }
  36. if {[string equal -nocase "**" $lastbind]} { set charbind "$botnick " }
  37. set replace(%char%) $charbind
  38. if {[info exists black(flood:activ:$host)]} {
  39. foreach tmr [utimers] {
  40. if {[string match "*black(flood:activ:$host)*" [join [lindex $tmr 1]]]} {
  41. set time [lindex $tmr 0]
  42. }
  43. }
  44. blacktools:tell $nick $host $hand $chan $chan1 h.16 "$time h"
  45. return
  46. }
  47. foreach tmr [utimers] {
  48. if {[string match "*black(floodcmd:$host:$chan)*" [join [lindex $tmr 1]]]} {
  49. killutimer [lindex $tmr 2]
  50. }
  51. }
  52. if {![info exists black(floodcmd:$host:$chan)]} {
  53. set black(floodcmd:$host:$chan) 0
  54. }
  55. incr black(floodcmd:$host:$chan)
  56. utimer $timer [list unset black(floodcmd:$host:$chan)]
  57. if {$black(floodcmd:$host:$chan) == "$number"} {
  58. blacktools:tell $nick $host $hand $chan $chan1 h.16 "30 h"
  59. set black(flood:activ:$host) 1
  60. utimer 30 [list unset black(flood:activ:$host)]
  61. return
  62. }
  63. set replace(%chan%) $chan
  64. set greeting [getuser $hand XTRA BT_WELCOME]
  65. set chanlang [string tolower [setting:get $chan lang]]
  66. if {[matchattr $hand -|V $chan]} {
  67. set access "VOICE"
  68. } elseif {[matchattr $hand -|O $chan]} {
  69. set access "OP"
  70. } elseif {[matchattr $hand -|A $chan]} {
  71. set access "ADMIN"
  72. } elseif {[matchattr $hand -|M $chan]} {
  73. set access "MANAGER"
  74. } elseif {[matchattr $hand n]} {
  75. set access "BOSS"
  76. } elseif {[matchattr $hand m]} {
  77. set access "OWNER"
  78. } elseif {[matchattr $hand o]} {
  79. set access "MASTER"
  80. }
  81. if {$chanlang == ""} { set chanlang "[string tolower $black(default_lang)]" }
  82. if {$greeting == ""} {
  83. set text1 [black:color:set "" $black(say.$chanlang.greeting.1)]
  84. set reply1 [join $text1]
  85. set text2 [black:color:set "" $black(say.$chanlang.greeting.2)]
  86. set reply2 [join $text2]
  87. set text3 [black:color:set "" $black(say.$chanlang.greeting.3)]
  88. set reply3 [join $text3]
  89. set text4 [black:color:set "" $black(say.$chanlang.greeting.4)]
  90. set reply4 [join $text4]
  91. set text5 [black:color:set "" $black(say.$chanlang.greeting.5)]
  92. set reply5 [join $text5]
  93. set text6 [black:color:set "" $black(say.$chanlang.greeting.6)]
  94. set reply6 [join $text6]
  95. putserv "PRIVMSG $nick :[string map [array get replace] $reply1]"
  96. putserv "PRIVMSG $nick :[string map [array get replace] $reply2]"
  97. putserv "PRIVMSG $nick :[string map [array get replace] $reply3]"
  98. putserv "PRIVMSG $nick :[string map [array get replace] $reply4]"
  99. putserv "PRIVMSG $nick :[string map [array get replace] $reply5]"
  100. putserv "PRIVMSG $nick :[string map [array get replace] $reply6]"
  101. setuser $hand XTRA BT_WELCOME 1
  102. return
  103. }
  104. set getlang [string tolower [getuser $hand XTRA OUTPUT_LANG]]
  105. if {$getlang == ""} { set getlang "[string tolower $black(default_lang)]" }
  106. if {$command == ""} {
  107. switch $access {
  108. VOICE {
  109. blacktools:tell $nick $host $hand $chan $chan1 h.5 $black(say.$getlang.level.6)
  110. switch $type {
  111. 0 {
  112. blacktools:tell $nick $host $hand $chan $chan1 h.6 none
  113. }
  114. 1 {
  115. blacktools:tell $nick $host $hand $chan $chan1 h.24 none
  116. }
  117. 2 {
  118. blacktools:tell $nick $host $hand $chan $chan1 h.20 none
  119. }
  120. }
  121. }
  122. OP {
  123. blacktools:tell $nick $host $hand $chan $chan1 h.7 $black(say.$getlang.level.5)
  124. switch $type {
  125. 0 {
  126. blacktools:tell $nick $host $hand $chan $chan1 h.8 none
  127. }
  128. 1 {
  129. blacktools:tell $nick $host $hand $chan $chan1 h.24 none
  130. }
  131. 2 {
  132. blacktools:tell $nick $host $hand $chan $chan1 h.20 none
  133. }
  134. }
  135. }
  136. ADMIN {
  137. blacktools:tell $nick $host $hand $chan $chan1 h.11 $black(say.$getlang.level.4)
  138. switch $type {
  139. 0 {
  140. blacktools:tell $nick $host $hand $chan $chan1 h.12 none
  141. }
  142. 1 {
  143. blacktools:tell $nick $host $hand $chan $chan1 h.23 none
  144. }
  145. 2 {
  146. blacktools:tell $nick $host $hand $chan $chan1 h.19 none
  147. }
  148. }
  149. }
  150. MANAGER {
  151. blacktools:tell $nick $host $hand $chan $chan1 h.13 $black(say.$getlang.level.3)
  152. switch $type {
  153. 0 {
  154. blacktools:tell $nick $host $hand $chan $chan1 h.14 none
  155. }
  156. 1 {
  157. blacktools:tell $nick $host $hand $chan $chan1 h.22 none
  158. }
  159. 2 {
  160. blacktools:tell $nick $host $hand $chan $chan1 h.18 none
  161. }
  162. }
  163. }
  164. OWNER {
  165. blacktools:tell $nick $host $hand $chan $chan1 h.3 $black(say.$getlang.level.2)
  166. switch $type {
  167. 0 {
  168. blacktools:tell $nick $host $hand $chan $chan1 h.4 none
  169. }
  170. 1 {
  171. blacktools:tell $nick $host $hand $chan $chan1 h.21 none
  172. }
  173. 2 {
  174. blacktools:tell $nick $host $hand $chan $chan1 h.17 none
  175. }
  176. }
  177. }
  178. MASTER {
  179. blacktools:tell $nick $host $hand $chan $chan1 h.1 $black(say.$getlang.level.8)
  180. switch $type {
  181. 0 {
  182. blacktools:tell $nick $host $hand $chan $chan1 h.25 none
  183. }
  184. 1 {
  185. blacktools:tell $nick $host $hand $chan $chan1 h.27 none
  186. }
  187. 2 {
  188. blacktools:tell $nick $host $hand $chan $chan1 h.26 none
  189. }
  190. }
  191. }
  192. BOSS {
  193. blacktools:tell $nick $host $hand $chan $chan1 h.1 $black(say.$getlang.level.1)
  194. switch $type {
  195. 0 {
  196. blacktools:tell $nick $host $hand $chan $chan1 h.4 none
  197. }
  198. 1 {
  199. blacktools:tell $nick $host $hand $chan $chan1 h.21 none
  200. }
  201. 2 {
  202. blacktools:tell $nick $host $hand $chan $chan1 h.17 none
  203. }
  204. }
  205. }
  206. }
  207. return
  208. }
  209. switch -exact -- [string tolower $command] {
  210. cmds {
  211. switch $access {
  212. VOICE {
  213. set cmds [string map [array get replace] $black(say.$getlang.cmdsvoice)]
  214. set split_cmds [split $cmds ";"]
  215. foreach cmd $split_cmds {
  216. set thecmd [lindex $cmd 0]
  217. set rest_of [lrange $cmd 1 end]
  218. set status [btcmd:status $chan $hand $thecmd 1]
  219. if {$status == "1"} {
  220. continue
  221. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  222. lappend show_cmds [join $applycmd " "]
  223. }
  224. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 330] {
  225. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 $txt
  226. }
  227. }
  228. OP {
  229. set cmds [string map [array get replace] $black(say.$getlang.cmdsop)]
  230. set split_cmds [split $cmds ";"]
  231. foreach cmd $split_cmds {
  232. set thecmd [lindex $cmd 0]
  233. set rest_of [lrange $cmd 1 end]
  234. set status [btcmd:status $chan $hand $thecmd 1]
  235. if {$status == "1"} {
  236. continue
  237. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  238. lappend show_cmds [join $applycmd " "]
  239. }
  240. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 330] {
  241. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 $txt
  242. }
  243. }
  244. ADMIN {
  245. set cmds [string map [array get replace] $black(say.$getlang.cmdadmin)]
  246. set split_cmds [split $cmds ";"]
  247. foreach cmd $split_cmds {
  248. set thecmd [lindex $cmd 0]
  249. set rest_of [lrange $cmd 1 end]
  250. set status [btcmd:status $chan $hand $thecmd 1]
  251. if {$status == "1"} {
  252. continue
  253. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  254. lappend show_cmds [join $applycmd " "]
  255. }
  256. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 330] {
  257. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 $txt
  258. }
  259. }
  260. MANAGER {
  261. set cmds [string map [array get replace] $black(say.$getlang.cmdmanager)]
  262. set split_cmds [split $cmds ";"]
  263. foreach cmd $split_cmds {
  264. set thecmd [lindex $cmd 0]
  265. set rest_of [lrange $cmd 1 end]
  266. set status [btcmd:status $chan $hand $thecmd 1]
  267. if {$status == "1"} {
  268. set applycmd "\00300,14$thecmd [join $rest_of]\003"
  269. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  270. lappend show_cmds [join $applycmd " "]
  271. }
  272. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 330] {
  273. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 $txt
  274. }
  275. }
  276. OWNER {
  277. set cmds [string map [array get replace] $black(say.$getlang.cmdbossowner)]
  278. set split_cmds [split $cmds ";"]
  279. foreach cmd $split_cmds {
  280. set thecmd [lindex $cmd 0]
  281. set rest_of [lrange $cmd 1 end]
  282. set status [btcmd:status $chan $hand $thecmd 1]
  283. if {$status == "1"} {
  284. set applycmd "\00300,14$thecmd [join $rest_of]\003"
  285. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  286. lappend show_cmds [join $applycmd " "]
  287. }
  288. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 330] {
  289. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 $txt
  290. }
  291. }
  292. BOSS {
  293. set cmds [string map [array get replace] $black(say.$getlang.cmdbossowner)]
  294. set split_cmds [split $cmds ";"]
  295. foreach cmd $split_cmds {
  296. set thecmd [lindex $cmd 0]
  297. set rest_of [lrange $cmd 1 end]
  298. set status [btcmd:status $chan $hand $thecmd 1]
  299. if {$status == "1"} {
  300. set applycmd "\00300,14$thecmd [join $rest_of]\003"
  301. } else {
  302. set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;"
  303. }
  304. lappend show_cmds [join $applycmd " "]
  305. }
  306. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 330] {
  307. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 $txt
  308. }
  309. }
  310. MASTER {
  311. set cmds [string map [array get replace] $black(say.$getlang.cmdmaster)]
  312. set split_cmds [split $cmds ";"]
  313. foreach cmd $split_cmds {
  314. set thecmd [lindex $cmd 0]
  315. set rest_of [lrange $cmd 1 end]
  316. set status [btcmd:status $chan $hand $thecmd 1]
  317. if {$status == "1"} {
  318. set applycmd "\00300,14$thecmd [join $rest_of]\003"
  319. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  320. lappend show_cmds [join $applycmd " "]
  321. }
  322. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 330] {
  323. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 $txt
  324. }
  325. }
  326. }
  327. switch $type {
  328. 0 {
  329. blacktools:tell $nick $host $hand $chan $chan1 hcommand.1 none
  330. }
  331. 1 {
  332. blacktools:tell $nick $host $hand $chan $chan1 hcommand.2 none
  333. }
  334. 2 {
  335. blacktools:tell $nick $host $hand $chan $chan1 hcommand.3 none
  336. }
  337. }
  338. }
  339. ban {
  340. switch $access {
  341. VOICE {
  342. set cmds [string map [array get replace] $black(say.$getlang.banvoice)]
  343. set split_cmds [split $cmds ";"]
  344. foreach cmd $split_cmds {
  345. set thecmd [lindex $cmd 0]
  346. set rest_of [lrange $cmd 1 end]
  347. set status [btcmd:status $chan $hand $thecmd 1]
  348. if {$status == "1"} {
  349. continue
  350. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  351. lappend show_cmds [join $applycmd " "]
  352. }
  353. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 450] {
  354. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 "$txt"
  355. }
  356. }
  357. OP {
  358. set cmds [string map [array get replace] $black(say.$getlang.banop)]
  359. set split_cmds [split $cmds ";"]
  360. foreach cmd $split_cmds {
  361. set thecmd [lindex $cmd 0]
  362. set rest_of [lrange $cmd 1 end]
  363. set status [btcmd:status $chan $hand $thecmd 1]
  364. if {$status == "1"} {
  365. continue
  366. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  367. lappend show_cmds [join $applycmd " "]
  368. }
  369. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 450] {
  370. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 "$txt"
  371. }
  372. }
  373. ADMIN {
  374. set cmds [string map [array get replace] $black(say.$getlang.banadmin)]
  375. set split_cmds [split $cmds ";"]
  376. foreach cmd $split_cmds {
  377. set thecmd [lindex $cmd 0]
  378. set rest_of [lrange $cmd 1 end]
  379. set status [btcmd:status $chan $hand $thecmd 1]
  380. if {$status == "1"} {
  381. continue
  382. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  383. lappend show_cmds [join $applycmd " "]
  384. }
  385. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 450] {
  386. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 "$txt"
  387. }
  388. }
  389. MANAGER {
  390. set cmds [string map [array get replace] $black(say.$getlang.banmanager)]
  391. set split_cmds [split $cmds ";"]
  392. foreach cmd $split_cmds {
  393. set thecmd [lindex $cmd 0]
  394. set rest_of [lrange $cmd 1 end]
  395. set status [btcmd:status $chan $hand $thecmd 1]
  396. if {$status == "1"} {
  397. set applycmd "\00300,14$thecmd [join $rest_of]\003"
  398. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  399. lappend show_cmds [join $applycmd " "]
  400. }
  401. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 450] {
  402. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 "$txt"
  403. }
  404. }
  405. OWNER {
  406. set cmds [string map [array get replace] $black(say.$getlang.banbossowner)]
  407. set split_cmds [split $cmds ";"]
  408. foreach cmd $split_cmds {
  409. set thecmd [lindex $cmd 0]
  410. set rest_of [lrange $cmd 1 end]
  411. set status [btcmd:status $chan $hand $thecmd 1]
  412. if {$status == "1"} {
  413. set applycmd "\00300,14$thecmd [join $rest_of]\003"
  414. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  415. lappend show_cmds [join $applycmd " "]
  416. }
  417. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 440] {
  418. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 "$txt"
  419. }
  420. }
  421. BOSS {
  422. set cmds [string map [array get replace] $black(say.$getlang.banbossowner)]
  423. set split_cmds [split $cmds ";"]
  424. foreach cmd $split_cmds {
  425. set thecmd [lindex $cmd 0]
  426. set rest_of [lrange $cmd 1 end]
  427. set status [btcmd:status $chan $hand $thecmd 1]
  428. if {$status == "1"} {
  429. set applycmd "\00300,14$thecmd [join $rest_of]\003"
  430. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  431. lappend show_cmds [join $applycmd " "]
  432. }
  433. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 440] {
  434. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 "$txt"
  435. }
  436. }
  437. MASTER {
  438. set cmds [string map [array get replace] $black(say.$getlang.banmaster)]
  439. set split_cmds [split $cmds ";"]
  440. foreach cmd $split_cmds {
  441. set thecmd [lindex $cmd 0]
  442. set rest_of [lrange $cmd 1 end]
  443. set status [btcmd:status $chan $hand $thecmd 1]
  444. if {$status == "1"} {
  445. set applycmd "\00300,14$thecmd [join $rest_of]\003"
  446. } else { set applycmd "\002$thecmd\002 [join $rest_of] ;" }
  447. lappend show_cmds [join $applycmd " "]
  448. }
  449. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 440] {
  450. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 "$txt"
  451. }
  452. }
  453. }
  454. switch $type {
  455. 0 {
  456. blacktools:tell $nick $host $hand $chan $chan1 hcommand.1 none
  457. }
  458. 1 {
  459. blacktools:tell $nick $host $hand $chan $chan1 hcommand.2 none
  460. }
  461. 2 {
  462. blacktools:tell $nick $host $hand $chan $chan1 hcommand.3 none
  463. }
  464. }
  465. }
  466. add {
  467. switch $access {
  468. ADMIN {
  469. set cmds [string map [array get replace] $black(say.$getlang.addadmin)]
  470. set split_cmds [split $cmds ";"]
  471. foreach cmd $split_cmds {
  472. set thecmd [lindex $cmd 0]
  473. set rest_of [lrange $cmd 1 end]
  474. set status [btcmd:status $chan $hand $thecmd 1]
  475. if {$status == "1"} {
  476. continue
  477. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  478. lappend show_cmds [join $applycmd " "]
  479. }
  480. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 330] {
  481. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 $txt
  482. }
  483. }
  484. MASTER {
  485. set cmds [string map [array get replace] $black(say.$getlang.addmaster)]
  486. set split_cmds [split $cmds ";"]
  487. foreach cmd $split_cmds {
  488. set thecmd [lindex $cmd 0]
  489. set rest_of [lrange $cmd 1 end]
  490. set status [btcmd:status $chan $hand $thecmd 1]
  491. if {$status == "1"} {
  492. set applycmd "\00300,14$thecmd [join $rest_of]\003"
  493. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  494. lappend show_cmds [join $applycmd " "]
  495. }
  496. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 330] {
  497. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 $txt
  498. }
  499. }
  500. MANAGER {
  501. set cmds [string map [array get replace] $black(say.$getlang.addmanager)]
  502. set split_cmds [split $cmds ";"]
  503. foreach cmd $split_cmds {
  504. set thecmd [lindex $cmd 0]
  505. set rest_of [lrange $cmd 1 end]
  506. set status [btcmd:status $chan $hand $thecmd 1]
  507. if {$status == "1"} {
  508. set applycmd "\00300,14$thecmd [join $rest_of]\003"
  509. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  510. lappend show_cmds [join $applycmd " "]
  511. }
  512. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 330] {
  513. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 $txt
  514. }
  515. }
  516. OWNER {
  517. set cmds [string map [array get replace] $black(say.$getlang.addowner)]
  518. set split_cmds [split $cmds ";"]
  519. foreach cmd $split_cmds {
  520. set thecmd [lindex $cmd 0]
  521. set rest_of [lrange $cmd 1 end]
  522. set status [btcmd:status $chan $hand $thecmd 1]
  523. if {$status == "1"} {
  524. set applycmd "\00300,14$thecmd [join $rest_of]\003"
  525. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  526. lappend show_cmds [join $applycmd " "]
  527. }
  528. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 330] {
  529. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 $txt
  530. }
  531. }
  532. BOSS {
  533. set cmds [string map [array get replace] $black(say.$getlang.addbossowner)]
  534. set split_cmds [split $cmds ";"]
  535. foreach cmd $split_cmds {
  536. set thecmd [lindex $cmd 0]
  537. set rest_of [lrange $cmd 1 end]
  538. set status [btcmd:status $chan $hand $thecmd 1]
  539. if {$status == "1"} {
  540. set applycmd "\00300,14$thecmd [join $rest_of]\003"
  541. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  542. lappend show_cmds [join $applycmd " "]
  543. }
  544. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 330] {
  545. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 $txt
  546. }
  547. }
  548. }
  549. switch $type {
  550. 0 {
  551. blacktools:tell $nick $host $hand $chan $chan1 hcommand.1 none
  552. }
  553. 1 {
  554. blacktools:tell $nick $host $hand $chan $chan1 hcommand.2 none
  555. }
  556. 2 {
  557. blacktools:tell $nick $host $hand $chan $chan1 hcommand.3 none
  558. }
  559. }
  560. }
  561. manager {
  562. if {$access == "MANAGER"} {
  563. set cmds [string map [array get replace] $black(say.$getlang.hmanager.1)]
  564. set split_cmds [split $cmds ";"]
  565. foreach cmd $split_cmds {
  566. set thecmd [lindex $cmd 0]
  567. set rest_of [lrange $cmd 1 end]
  568. set status [btcmd:status $chan $hand $thecmd 1]
  569. if {$status == "1"} {
  570. set applycmd "\00300,14$thecmd [join $rest_of]\003"
  571. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  572. lappend show_cmds [join $applycmd " "]
  573. }
  574. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 330] {
  575. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 $txt
  576. }
  577. switch $type {
  578. 0 {
  579. blacktools:tell $nick $host $hand $chan $chan1 hcommand.1 none
  580. }
  581. 1 {
  582. blacktools:tell $nick $host $hand $chan $chan1 hcommand.2 none
  583. }
  584. 2 {
  585. blacktools:tell $nick $host $hand $chan $chan1 hcommand.3 none
  586. }
  587. }
  588. }
  589. }
  590. master {
  591. if {$access == "MASTER"} {
  592. set cmds [string map [array get replace] $black(say.$getlang.hmaster.1)]
  593. set split_cmds [split $cmds ";"]
  594. foreach cmd $split_cmds {
  595. set thecmd [lindex $cmd 0]
  596. set rest_of [lrange $cmd 1 end]
  597. set status [btcmd:status $chan $hand $thecmd 1]
  598. if {$status == "1"} {
  599. set applycmd "\00300,14$thecmd [join $rest_of]\003"
  600. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  601. lappend show_cmds [join $applycmd " "]
  602. }
  603. }
  604. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 330] {
  605. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 "$txt"
  606. }
  607. switch $type {
  608. 0 {
  609. blacktools:tell $nick $host $hand $chan $chan1 hcommand.1 none
  610. }
  611. 1 {
  612. blacktools:tell $nick $host $hand $chan $chan1 hcommand.2 none
  613. }
  614. 2 {
  615. blacktools:tell $nick $host $hand $chan $chan1 hcommand.3 none
  616. }
  617. }
  618. }
  619. owner {
  620. if {[matchattr $hand nm]} {
  621. set cmds [string map [array get replace] $black(say.$getlang.hbossowner.1)]
  622. set split_cmds [split $cmds ";"]
  623. foreach cmd $split_cmds {
  624. set thecmd [lindex $cmd 0]
  625. set rest_of [lrange $cmd 1 end]
  626. set status [btcmd:status $chan $hand $thecmd 1]
  627. if {$status == "1"} {
  628. set applycmd "\00300,14$thecmd [join $rest_of]\003"
  629. } else { set applycmd "[black:color 1 $hand $thecmd] [black:color 6 $hand [join $rest_of]] ;" }
  630. lappend show_cmds [join $applycmd " "]
  631. }
  632. }
  633. foreach txt [h:wrap [string map [array get replace] [join $show_cmds]] 330] {
  634. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 "$txt"
  635. }
  636. switch $type {
  637. 0 {
  638. blacktools:tell $nick $host $hand $chan $chan1 hcommand.1 none
  639. }
  640. 1 {
  641. blacktools:tell $nick $host $hand $chan $chan1 hcommand.2 none
  642. }
  643. 2 {
  644. blacktools:tell $nick $host $hand $chan $chan1 hcommand.3 none
  645. }
  646. }
  647. }
  648. btinfo {
  649. if {[matchattr $hand nmo|M $chan]} {
  650. foreach setting $black(extra_flag) {
  651. if {$setting != ""} {
  652. if {[string equal -nocase $setting "chanlink"]} {
  653. continue
  654. }
  655. if {([string equal -nocase $setting "invisible"] || [string equal -nocase $setting "forward"]) && [matchattr $hand mo|M $chan] && ![matchattr $hand n]} {
  656. continue
  657. }
  658. if {[setting:get $chan $setting]} {
  659. lappend btflags +[black:color 2 $hand $setting]
  660. } else {
  661. lappend btflags -[black:color 4 $hand $setting]
  662. }
  663. }
  664. }
  665. set btflag_list "$black(say.$getlang.hchaninfo.2) $btflags"
  666. foreach flag [wordwrap [join $btflag_list] 440] {
  667. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 "$flag"
  668. }
  669. switch $type {
  670. 0 {
  671. blacktools:tell $nick $host $hand $chan $chan1 hcommand.4 none
  672. }
  673. 1 {
  674. blacktools:tell $nick $host $hand $chan $chan1 hcommand.5 none
  675. }
  676. 2 {
  677. blacktools:tell $nick $host $hand $chan $chan1 hcommand.6 none
  678. }
  679. }
  680. }
  681. }
  682. chaninfo {
  683. if {[matchattr $hand nmo|M $chan]} {
  684. set flag_list ""
  685. foreach info [channel info $chan] {
  686. if {[regexp {^[+]} $info]} {
  687. lappend flag_list [black:color 2 $hand $info]
  688. }
  689. if {[regexp {^[-]} $info]} {
  690. lappend flag_list [black:color 4 $hand $info]
  691. }
  692. }
  693. set expirebans [setting:get $chan expirebans]
  694. if {$expirebans == ""} {
  695. set expirebans $black(default:bantime)
  696. }
  697. set floodchan [channel get $chan flood-chan]
  698. set floodjoin [channel get $chan flood-join]
  699. set floodkick [channel get $chan flood-kick]
  700. set floodctcp [channel get $chan flood-ctcp]
  701. set floodnick [channel get $chan flood-nick]
  702. set flooddeop [channel get $chan flood-deop]
  703. set chanmode [channel get $chan chanmode]
  704. set floodchan [string map {" " ":"} $floodchan]
  705. set floodjoin [string map {" " ":"} $floodjoin]
  706. set floodkick [string map {" " ":"} $floodkick]
  707. set floodctcp [string map {" " ":"} $floodctcp]
  708. set floodnick [string map {" " ":"} $floodnick]
  709. set flooddeop [string map {" " ":"} $flooddeop]
  710. set eggdrop_flags "[black:color 1 $hand flood-chan] $floodchan [black:color 1 $hand flood-join] $floodjoin [black:color 1 $hand flood-kick] $floodkick [black:color 1 $hand flood-ctcp] $floodctcp [black:color 1 $hand flood-nick] $floodnick [black:color 1 $hand flood-deop] $flooddeop [black:color 1 $hand expirebans] $expirebans [black:color 1 $hand chanmode] $chanmode"
  711. foreach flag [wordwrap $flag_list 400] {
  712. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 " $black(say.$getlang.hchaninfo.1) $flag"
  713. }
  714. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 "$black(say.$getlang.hchaninfo.3) : $eggdrop_flags"
  715. switch $type {
  716. 0 {
  717. blacktools:tell $nick $host $hand $chan $chan1 hcommand.4 none
  718. }
  719. 1 {
  720. blacktools:tell $nick $host $hand $chan $chan1 hcommand.5 none
  721. }
  722. 2 {
  723. blacktools:tell $nick $host $hand $chan $chan1 hcommand.6 none
  724. }
  725. }
  726. }
  727. }
  728. module {
  729. set allmodules "Anunt AutoBroadcast BadChan Idle Limit XTools Xonly Seen VoiceMe VoiceOnMsg CloneScan EGG ChanLink SecureMode Private GuestNick Greet Leave Topic Timer Next TopWords BackChan ReportNick Quote Note Language"
  730. set manager_module "Anunt BadChan Idle Limit XTools Xonly Seen VoiceMe VoiceOnMsg Clonescan Securemode Private Guestnick Greet Leave Topic Next TopWords BackChan ReportNick Quote Note Language"
  731. set owner_modules "Anunt AutoBroadcast BadChan Idle Limit CloneScan XTools Xonly Seen VoiceMe VoiceOnMsg CloneScan EGG ChanLink SecureMode Private GuestNick Greet Leave Topic Timer Next TopWords BackChan ReportNick Quote Note Language"
  732. set module_output ""
  733. set other_module "Note"
  734. set master_module "Anunt BadChan Idle Limit XTools Xonly Seen VoiceMe VoiceOnMsg Clonescan Securemode Private Guestnick Greet Leave Topic Next TopWords BackChan ReportNick Quote Note Language"
  735. if {[matchattr $hand n]} {
  736. set current_modules $allmodules
  737. } elseif {[matchattr $hand m]} {
  738. set current_modules $owner_modules
  739. } elseif {[matchattr $hand o]} {
  740. set current_modules $master_module
  741. } elseif {[matchattr $hand -|M $chan]} {
  742. set current_modules $manager_module
  743. } else {
  744. set current_modules $other_module
  745. }
  746. foreach m $current_modules {
  747. if {[string equal -nocase $m "quote"]} {
  748. set m "q"
  749. }
  750. if {[string equal -nocase $m "autobroadcast"]} {
  751. set m "bt"
  752. }
  753. set cmd_status [btcmd:status $chan $hand $m 1]
  754. if {[string equal -nocase $m "Topic"]} {
  755. set m "AutoTopic"
  756. }
  757. if {[string equal -nocase $m "q"]} {
  758. set m "Quote"
  759. }
  760. if {[string equal -nocase $m "bt"]} {
  761. set m "AutoBroadcast"
  762. }
  763. if {$cmd_status == "1"} {
  764. set m "\0034$m\003"
  765. }
  766. switch [string tolower [color:filter $m]] {
  767. anunt {
  768. if {[setting:get $chan anunt]} {
  769. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  770. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  771. }
  772. quote {
  773. if {[setting:get $chan quote]} {
  774. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  775. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  776. }
  777. note {
  778. if {[setting:get $chan note]} {
  779. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  780. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  781. }
  782. chanlink {
  783. if {[link:status $chan] == "1"} {
  784. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  785. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"
  786. }
  787. }
  788. autobroadcast {
  789. set found_module 0
  790. foreach tmr [timers] {
  791. if {[string match "*broadcastpublic:show*" [join [lindex $tmr 1]]]} {
  792. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  793. set found_module 1
  794. }
  795. }
  796. if {$found_module == "0"} {
  797. lappend module_output "[black:color 4 $hand $m]\[-\] ;"
  798. }
  799. }
  800. badchan {
  801. if {[setting:get $chan antibadchan]} {
  802. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  803. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  804. }
  805. idle {
  806. set idle_type ""
  807. if {[setting:get $chan idleop]} {
  808. set idle_type "@"
  809. }
  810. if {[setting:get $chan idlevoice]} {
  811. set idle_type "$idle_type+"
  812. }
  813. if {$idle_type == ""} {
  814. set idle_type ""
  815. }
  816. lappend module_output "[black:color 1 $hand $m]\[$idle_type\] ;"
  817. }
  818. limit {
  819. if {[setting:get $chan limit]} {
  820. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  821. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  822. }
  823. clonescan {
  824. if {[setting:get $chan clonescan]} {
  825. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  826. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  827. }
  828. xtools {
  829. if {[setting:get $chan xtools]} {
  830. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  831. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  832. }
  833. xonly {
  834. if {[setting:get $chan xonly]} {
  835. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  836. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  837. }
  838. seen {
  839. if {[setting:get $chan seen]} {
  840. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  841. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  842. }
  843. voiceme {
  844. if {[setting:get $chan voiceme]} {
  845. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  846. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  847. }
  848. voiceonmsg {
  849. if {[setting:get $chan voiceonmsg]} {
  850. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  851. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  852. }
  853. egg {
  854. lappend module_output "[black:color 1 $hand $m]\[\] ;"
  855. }
  856. note {
  857. if {[setting:get $chan note]} {
  858. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  859. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  860. }
  861. securemode {
  862. if {[setting:get $chan securemode]} {
  863. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  864. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;" }
  865. }
  866. private {
  867. if {[setting:get $chan private]} {
  868. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  869. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;" }
  870. }
  871. guestnick {
  872. if {[setting:get $chan guestnick]} {
  873. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  874. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  875. }
  876. greet {
  877. if {[setting:get $chan greet]} {
  878. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  879. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  880. }
  881. leave {
  882. if {[setting:get $chan leave]} {
  883. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  884. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  885. }
  886. autotopic {
  887. if {[setting:get $chan autotopic]} {
  888. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  889. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  890. }
  891. timer {
  892. lappend module_output "[black:color 1 $hand $m]\[\] ;"
  893. }
  894. topwords {
  895. if {[setting:get $chan topwords]} {
  896. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  897. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  898. }
  899. next {
  900. if {[setting:get $chan next]} {
  901. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  902. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  903. }
  904. quote {
  905. if {[setting:get $chan quoteofday]} {
  906. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  907. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  908. }
  909. backchan {
  910. if {[setting:get $chan backchan] != ""} {
  911. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  912. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  913. }
  914. reportnick {
  915. if {[setting:get $chan reportnick]} {
  916. lappend module_output "[black:color 2 $hand $m]\[+\] ;"
  917. } else { lappend module_output "[black:color 4 $hand $m]\[-\] ;"}
  918. }
  919. language {
  920. set lang [string toupper [setting:get $chan lang]]
  921. if {$getlang == ""} { set getlang "[string toupper $black(default_lang)]" }
  922. lappend module_output "[black:color 1 $hand $m]\[$lang\] ;"
  923. }
  924. }
  925. }
  926. blacktools:tell:h $nick $host $hand $chan $chan1 h.15 "[join $module_output]"
  927. switch $type {
  928. 0 {
  929. blacktools:tell $nick $host $hand $chan $chan1 hcommand.7 none
  930. }
  931. 1 {
  932. blacktools:tell $nick $host $hand $chan $chan1 hcommand.8 none
  933. }
  934. 2 {
  935. blacktools:tell $nick $host $hand $chan $chan1 hcommand.9 none
  936. }
  937. }
  938. }
  939. egg {
  940. set tcl_config $black(tclconfig)
  941. set eggcmds ""
  942. set egg_cmds "cmdchar;defaultlang;homechan;nick;realname;away;defaultoutput;floodmenuprot;floodmsgprot;floodnotcprot;chanremove-setting;user-expire;pagelimit;login;chanserv;hostchanserv;userlogin;userpass;add-mask;adduser-mask;antispam-cycletime;idle-scantime;voiceme-showtime;clonescan-scantime;broadcast-showtime;badchan-scantime;anunt-showtime;quoteofday-showtime"
  943. set split_cmds [split $egg_cmds ";"]
  944. foreach cmd [color:filter $split_cmds] {
  945. switch $cmd {
  946. away {
  947. set get_info [config:getinfo $tcl_config "set black(default_away) \"*\""]
  948. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  949. }
  950. adduser-mask {
  951. set get_info [config:getinfo $tcl_config "set black(addusermask) \"*\""]
  952. switch $get_info {
  953. 1 {
  954. set get_info "*!*@host"
  955. }
  956. 2 {
  957. set get_info "*!user@host"
  958. }
  959. 3 {
  960. set get_info "nick!user@host"
  961. }
  962. 4 {
  963. set get_info "nick!*@*"
  964. }
  965. 5 {
  966. set get_info "*!user@*"
  967. }
  968. }
  969. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  970. }
  971. hostchanserv {
  972. set get_info [config:getinfo $tcl_config "set black(hostchanserv) \"*\""]
  973. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  974. }
  975. quoteofday-showtime {
  976. set get_info [config:getinfo $tcl_config "set black(quote:msgtime) \"*\""]
  977. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  978. }
  979. anunt-showtime {
  980. set get_info [config:getinfo $tcl_config "set black(anunttime) \"*\""]
  981. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  982. }
  983. badchan-scantime {
  984. set get_info [config:getinfo $tcl_config "set black(badchan:scantime) \"*\""]
  985. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  986. }
  987. clonescan-scantime {
  988. set get_info [config:getinfo $tcl_config "set black(clonescantime) \"*\""]
  989. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  990. }
  991. broadcast-showtime {
  992. set get_info [config:getinfo $tcl_config "set black(bttime) \"*\""]
  993. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  994. }
  995. voiceme-showtime {
  996. set get_info [config:getinfo $tcl_config "set black(voiceme:msgtime) \"*\""]
  997. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  998. }
  999. idle-scantime {
  1000. set get_info [config:getinfo $tcl_config "set black(idleinterval) \"*\""]
  1001. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  1002. }
  1003. antispam-cycletime {
  1004. set get_info [config:getinfo $tcl_config "set black(spamcycle) \"*\""]
  1005. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  1006. }
  1007. add-mask {
  1008. set get_info [config:getinfo $tcl_config "set black(hostadd) \"*\""]
  1009. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  1010. }
  1011. realname {
  1012. set get_info [config:getinfo $config "set realname \"*\""]
  1013. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  1014. }
  1015. userlogin {
  1016. set get_info [config:getinfo $tcl_config "set black(username) \"*\""]
  1017. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  1018. }
  1019. chanserv {
  1020. set get_info [config:getinfo $tcl_config "set black(chanserv) \"*\""]
  1021. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  1022. }
  1023. nick {
  1024. set get_info [config:getinfo $config "set nick \"*\""]
  1025. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  1026. }
  1027. cmdchar {
  1028. set get_info [config:getinfo $tcl_config "set black(cmdchar) \"*\""]
  1029. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  1030. }
  1031. defaultlang {
  1032. set get_info [config:getinfo $tcl_config "set black(default_lang) \"*\""]
  1033. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  1034. }
  1035. defaultoutput {
  1036. set get_info [config:getinfo $tcl_config "set black(default_output) \"*\""]
  1037. switch $get_info {
  1038. 0 {
  1039. set get_info "NOTICE"
  1040. }
  1041. 1 {
  1042. set get_info "CHAN"
  1043. }
  1044. 2 {
  1045. set get_info "PRIVMSG"
  1046. }
  1047. }
  1048. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  1049. }
  1050. homechan {
  1051. set get_info [config:getinfo $tcl_config "set black(homechan) \"*\""]
  1052. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  1053. }
  1054. floodmenuprot {
  1055. set get_info [config:getinfo $tcl_config "set black(antiflood:cmd) \"*\""]
  1056. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  1057. }
  1058. floodmsgprot {
  1059. set get_info [config:getinfo $tcl_config "set black(msg:flood) \"*\""]
  1060. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  1061. }
  1062. floodnotcprot {
  1063. set get_info [config:getinfo $tcl_config "set black(notice:flood) \"*\""]
  1064. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  1065. }
  1066. chanremove-setting {
  1067. set get_info [config:getinfo $tcl_config "set black(chanremove_all) \"*\""]
  1068. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  1069. }
  1070. user-expire {
  1071. set get_info [config:getinfo $tcl_config "set black(user_expire_time) \"*\""]
  1072. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info$black(say.$getlang.timeout.4)\]
  1073. }
  1074. pagelimit {
  1075. set get_info [config:getinfo $tcl_config "set black(modul:nr:entries) \"*\""]
  1076. lappend eggcmds [black:color 2 $hand $cmd]\[$get_info\]
  1077. }
  1078. login {
  1079. lappend eggcmds [black:color 2 $hand $cmd]
  1080. }
  1081. default {
  1082. lappend eggcmds [black:color 2 $hand $cmd]\[\]
  1083. }
  1084. }
  1085. }
  1086. foreach option [h:wrap [join $eggcmds " ; "] 450] {
  1087. blacktools:tell:h $nick $host $hand $chan $chan1 hegg.1 "$option"
  1088. }
  1089. switch $type {
  1090. 0 {
  1091. blacktools:tell $nick $host $hand $chan $chan1 hegg.2 none
  1092. }
  1093. 1 {
  1094. blacktools:tell $nick $host $hand $chan $chan1 hegg.3 none
  1095. }
  1096. 2 {
  1097. blacktools:tell $nick $host $hand $chan $chan1 hegg.4 none
  1098. }
  1099. }
  1100. }
  1101. }
  1102. }
  1103. ##############
  1104. #########################################################################
  1105. ## END ##
  1106. #########################################################################