BT.H.tcl 35 KB

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