Advertisement
kyroskoh

NK0005.tcl (Public Commands Not Requiring Ops)

Mar 22nd, 2011
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.08 KB | None | 0 0
  1. ##### Script Name : Public Commands Requiring Ops
  2. ##### Script Version : NK0005.0.tcl
  3. ##### Edited & Bug Fixed By : Kyros Koh (i.am@kyroskoh.com)
  4.  
  5. ##### Pre-Loaded Settings #####
  6.  
  7. putlog "NK0005.tcl Loaded. Functions Enabled..."
  8.  
  9. ###################################### Edit Below #########################################
  10. ##### Bind Command (Edit Only The Flags Below. Format: global|channel) #####
  11. ##### Comment Out Commands That You Do Not Want To Use #####
  12. ##### You Can Change The Command Name #####
  13.  
  14. bind pub n|n !opme NK0005-pub:!opme
  15. bind pub n|n !deopme NK0005-pub:!deopme
  16. bind pub n|n !voiceme NK0005-pub:!voiceme
  17. bind pub n|n !devoiceme NK0005-pub:!devoiceme
  18. bind pub n|n !ovme NK0005-pub:!ovme
  19.  
  20. bind pub n|n !deovme NK0005-pub:!deovme
  21. bind pub n|n !op NK0005-pub:!op
  22. bind pub n|n !deop NK0005-pub:!deop
  23. bind pub n|n !voice NK0005-pub:!voice
  24. bind pub n|n !devoice NK0005-pub:!devoice
  25.  
  26. bind pub n|n !ov NK0005-pub:!ov
  27. bind pub n|n !deov NK0005-pub:!deov
  28. bind pub n|n !ban NK0005-pub:!ban
  29. bind pub n|n !unban NK0005-pub:!unban
  30. bind pub n|n !kick NK0005-pub:!kick
  31.  
  32. bind pub n|n !kickban NK0005-pub:!kickban
  33. bind pub n|n !topic NK0005-pub:!topic
  34. bind pub n|n !clearops NK0005-pub:!clearops
  35. bind pub n|n !clearvoice NK0005-pub:!clearvoice
  36. bind pub n|n !clearbans NK0005-pub:!clearbans
  37.  
  38. bind pub n|n !clear NK0005-pub:!clear
  39. bind pub n|n !mode NK0005-pub:!mode
  40. bind pub n|n !invite NK0005-pub:!invite
  41. bind pub n|n !kickr NK0005-pub:!kickr
  42.  
  43. ##### You Can Change The Command Name #####
  44. ##### Comment Out Commands That You Do Not Want To Use #####
  45. ##### Bind Command (Edit Only The Flags Above. Format: global|channel) #####
  46. ###################################### Edit Above #########################################
  47.  
  48. ##### Opme Command #####
  49.  
  50.  
  51. proc NK0005-pub:!opme { nickname userhost handle channel text } {
  52. global botnick
  53. if { [llength $text] != 0 } {
  54. putquick "NOTICE $nickname : Syntax : !opme"
  55. } else {
  56. if { [botisop $channel] == 1 } {
  57. if { [isop $nickname $channel] == 1 } {
  58. putquick "NOTICE $nickname : You Are Already Opped On $channel"
  59. } else {
  60. putquick "MODE $channel +o $nickname"
  61. putquick "NOTICE $nickname : Opping You On $channel"
  62. }
  63. } else {
  64. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  65. }
  66. }
  67. }
  68.  
  69. ##### Deopme Command #####
  70.  
  71.  
  72. proc NK0005-pub:!deopme { nickname userhost handle channel text } {
  73. global botnick
  74. if { [llength $text] != 0 } {
  75. putquick "NOTICE $nickname : Syntax : !deopme"
  76. } else {
  77. if { [botisop $channel] == 1 } {
  78. if { [isop $nickname $channel] == 0 } {
  79. putquick "NOTICE $nickname : You Are Not Opped On $channel"
  80. } else {
  81. putquick "MODE $channel -o $nickname"
  82. putquick "NOTICE $nickname : Deopping You On $channel"
  83. }
  84. } else {
  85. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  86. }
  87. }
  88. }
  89.  
  90. ##### Voiceme Command #####
  91.  
  92.  
  93. proc NK0005-pub:!voiceme { nickname userhost handle channel text } {
  94. global botnick
  95. if { [llength $text] != 0 } {
  96. putquick "NOTICE $nickname : Syntax : !voiceme"
  97. } else {
  98. if { [botisop $channel] == 1 } {
  99. if { [isvoice $nickname $channel] == 1 } {
  100. putquick "NOTICE $nickname : You Are Already Voiced On $channel"
  101. } else {
  102. putquick "MODE $channel +v $nickname"
  103. putquick "NOTICE $nickname : Voicing You On $channel"
  104. }
  105. } else {
  106. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  107. }
  108. }
  109. }
  110.  
  111. ##### Devoiceme Command #####
  112.  
  113.  
  114. proc NK0005-pub:!devoiceme { nickname userhost handle channel text } {
  115. global botnick
  116. if { [llength $text] != 0 } {
  117. putquick "NOTICE $nickname : Syntax : !devoiceme"
  118. } else {
  119. if { [botisop $channel] == 1 } {
  120. if { [isvoice $nickname $channel] == 0 } {
  121. putquick "NOTICE $nickname : You Are Not Voiced On $channel"
  122. } else {
  123. putquick "MODE $channel -v $nickname"
  124. putquick "NOTICE $nickname : Devoicing You On $channel"
  125. }
  126. } else {
  127. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  128. }
  129. }
  130. }
  131.  
  132. ##### Op/Voice Me Command #####
  133.  
  134.  
  135. proc NK0005-pub:!ovme { nickname userhost handle channel text } {
  136. global botnick
  137. if { [llength $text] != 0 } {
  138. putquick "NOTICE $nickname : Syntax : !ovme"
  139. } else {
  140. if { [botisop $channel] == 1 } {
  141. if { [isop $nickname $channel] == 1 && [isvoice $nickname $channel] == 1 } {
  142. putquick "NOTICE $nickname : You Are Already Opped And Voiced On $channel"
  143. } elseif {
  144. if { [isop $nickname $channel] == 0 && [isvoice $nickname $channel] == 0 } {
  145. putquick "MODE $channel +ov $nickname $nickname"
  146. putquick "NOTICE $nickname : Opping And Voicing You On $channel"
  147. return
  148. }
  149. if { [isop $nickname $channel] == 0 } {
  150. putquick "MODE $channel +o $nickname"
  151. putquick "NOTICE $nickname : Opping You On $channel"
  152. }
  153. if { [isvoice $nickname $channel] == 0 } {
  154. putquick "MODE $channel +v $nickname"
  155. putquick "NOTICE $nickname : Voicing You On $channel"
  156. }
  157. }
  158. } else {
  159. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  160. }
  161. }
  162. }
  163.  
  164. ##### Deop/Devoice Me Command #####
  165.  
  166.  
  167. proc NK0005-pub:!deovme { nickname userhost handle channel text } {
  168. global botnick
  169. if { [llength $text] != 0 } {
  170. putquick "NOTICE $nickname : Syntax : !deovme"
  171. } else {
  172. if { [botisop $channel] == 1 } {
  173. if { [isop $nickname $channel] == 0 && [isvoice $nickname $channel] == 0 } {
  174. putquick "NOTICE $nickname : You Are Not Opped Or Voiced On $channel"
  175. } elseif {
  176. if { [isop $nickname $channel] == 1 && [isvoice $nickname $channel] == 1 } {
  177. putquick "MODE $channel -ov $nickname $nickname"
  178. putquick "NOTICE $nickname : Deopping And Devoicing You On $channel"
  179. return
  180. }
  181. if { [isop $nickname $channel] == 1 } {
  182. putquick "MODE $channel -o $nickname"
  183. putquick "NOTICE $nickname : Deopping You On $channel"
  184. }
  185. if { [isvoice $nickname $channel] == 1 } {
  186. putquick "MODE $channel -v $nickname"
  187. putquick "NOTICE $nickname : Devoicing You On $channel"
  188. }
  189. }
  190. } else {
  191. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  192. }
  193. }
  194. }
  195.  
  196. ##### Op Command #####
  197.  
  198.  
  199. proc NK0005-pub:!op { nickname userhost handle channel text } {
  200. global botnick
  201. set NK0005-pub:!op-nicks ""
  202. if { [llength $text] == 0 } {
  203. putquick "NOTICE $nickname : Syntax : !op <nickname1> \[nickname2\]..."
  204. } else {
  205. if { [botisop $channel] == 1 } {
  206. for { set i 0 } { $i < [llength $text] } { incr i } {
  207. if { [isop [lindex $text $i] $channel] == 0 } {
  208. pushmode $channel +o [lindex $text $i]
  209. set NK0005-pub:!op-nicks "${NK0005-pub:!op-nicks} [lindex $text $i]"
  210. }
  211. }
  212. putquick "NOTICE $nickname : Opping ([llength ${NK0005-pub:!op-nicks}]) ${NK0005-pub:!op-nicks} On $channel"
  213. } else {
  214. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  215. }
  216. }
  217. }
  218.  
  219. ##### Deop Command #####
  220.  
  221.  
  222. proc NK0005-pub:!deop { nickname userhost handle channel text } {
  223. global botnick
  224. set NK0005-pub:!deop-nicks ""
  225. if { [llength $text] == 0 } {
  226. putquick "NOTICE $nickname : Syntax : !deop <nickname1> \[nickname2\]..."
  227. } else {
  228. if { [botisop $channel] == 1 } {
  229. for { set i 0 } { $i < [llength $text] } { incr i } {
  230. if { [isbotnick [lindex $text $i]] == 0 } {
  231. if { [isop [lindex $text $i] $channel] == 1 } {
  232. pushmode $channel -o [lindex $text $i]
  233. set NK0005-pub:!deop-nicks "${NK0005-pub:!deop-nicks} [lindex $text $i]"
  234. }
  235. }
  236. }
  237. putquick "NOTICE $nickname : Deopping ([llength ${NK0005-pub:!deop-nicks}]) ${NK0005-pub:!deop-nicks} On $channel"
  238. } else {
  239. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  240. }
  241. }
  242. }
  243.  
  244. ##### Voice Command #####
  245.  
  246.  
  247. proc NK0005-pub:!voice { nickname userhost handle channel text } {
  248. global botnick
  249. set NK0005-pub:!voice-nicks ""
  250. if { [llength $text] == 0 } {
  251. putquick "NOTICE $nickname : Syntax : !voice <nickname1> \[nickname2\]..."
  252. } else {
  253. if { [botisop $channel] == 1 } {
  254. for { set i 0 } { $i < [llength $text] } { incr i } {
  255. if { [isvoice [lindex $text $i] $channel] == 0 } {
  256. pushmode $channel +v [lindex $text $i]
  257. set NK0005-pub:!voice-nicks "${NK0005-pub:!voice-nicks} [lindex $text $i]"
  258. }
  259. }
  260. putquick "NOTICE $nickname : Voicing ([llength ${NK0005-pub:!voice-nicks}]) ${NK0005-pub:!voice-nicks} On $channel"
  261. } else {
  262. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  263. }
  264. }
  265. }
  266.  
  267. ##### Devoice Command #####
  268.  
  269.  
  270. proc NK0005-pub:!devoice { nickname userhost handle channel text } {
  271. global botnick
  272. set NK0005-pub:!devoice-nicks ""
  273. if { [llength $text] == 0 } {
  274. putquick "NOTICE $nickname : Syntax : !devoice <nickname1> \[nickname2\]..."
  275. } else {
  276. if { [botisop $channel] == 1 } {
  277. for { set i 0 } { $i < [llength $text] } { incr i } {
  278. if { [isbotnick [lindex $text $i]] == 0 } {
  279. if { [isvoice [lindex $text $i] $channel] == 1 } {
  280. pushmode $channel -v [lindex $text $i]
  281. set NK0005-pub:!devoice-nicks "${NK0005-pub:!devoice-nicks} [lindex $text $i]"
  282. }
  283. }
  284. }
  285. putquick "NOTICE $nickname : Devoicing ([llength ${NK0005-pub:!devoice-nicks}]) ${NK0005-pub:!devoice-nicks} On $channel"
  286. } else {
  287. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  288. }
  289. }
  290. }
  291.  
  292. ##### Op/Voice Command #####
  293.  
  294.  
  295. proc NK0005-pub:!ov { nickname userhost handle channel text } {
  296. global botnick
  297. set NK0005-pub:!ov-ops ""
  298. set NK0005-pub:!ov-voices ""
  299. if { [llength $text] == 0 } {
  300. putquick "NOTICE $nickname : Syntax : !ov <nickname1> \[nickname2\]..."
  301. } else {
  302. if { [botisop $channel] == 1 } {
  303. for { set i 0 } { $i < [llength $text] } { incr i } {
  304. if { [isop [lindex $text $i] $channel] == 0 } {
  305. pushmode $channel +o [lindex $text $i]
  306. set NK0005-pub:!ov-ops "${NK0005-pub:!ov-ops} [lindex $text $i]"
  307. }
  308. if { [isvoice [lindex $text $i] $channel] == 0 } {
  309. pushmode $channel +v [lindex $text $i]
  310. set NK0005-pub:!ov-voices "${NK0005-pub:!ov-voices} [lindex $text $i]"
  311. }
  312. }
  313. putquick "NOTICE $nickname : Opping ([llength ${NK0005-pub:!ov-ops}]) ${NK0005-pub:!ov-ops} On $channel"
  314. putquick "NOTICE $nickname : Voicing ([llength ${NK0005-pub:!ov-voices}]) ${NK0005-pub:!ov-voices} On $channel"
  315. } else {
  316. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  317. }
  318. }
  319. }
  320.  
  321. ##### Deop/Devoice Command #####
  322.  
  323.  
  324. proc NK0005-pub:!deov { nickname userhost handle channel text } {
  325. global botnick
  326. set NK0005-pub:!deov-ops ""
  327. set NK0005-pub:!deov-voices ""
  328. if { [llength $text] == 0 } {
  329. putquick "NOTICE $nickname : Syntax : !deov <nickname1> \[nickname2\]..."
  330. } else {
  331. if { [botisop $channel] == 1 } {
  332. for { set i 0 } { $i < [llength $text] } { incr i } {
  333. if { [isbotnick [lindex $text $i]] == 0 } {
  334. if { [isop [lindex $text $i] $channel] == 1 } {
  335. pushmode $channel -o [lindex $text $i]
  336. set NK0005-pub:!deov-ops "${NK0005-pub:!deov-ops} [lindex $text $i]"
  337. }
  338. if { [isvoice [lindex $text $i] $channel] == 1 } {
  339. pushmode $channel -v [lindex $text $i]
  340. set NK0005-pub:!deov-voices "${NK0005-pub:!deov-voices} [lindex $text $i]"
  341. }
  342. }
  343. }
  344. putquick "NOTICE $nickname : Deopping ([llength ${NK0005-pub:!deov-ops}]) ${NK0005-pub:!deov-ops} On $channel"
  345. putquick "NOTICE $nickname : Devoicing ([llength ${NK0005-pub:!deov-voices}]) ${NK0005-pub:!deov-voices} On $channel"
  346. } else {
  347. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  348. }
  349. }
  350. }
  351.  
  352. ##### Ban Command #####
  353.  
  354.  
  355. proc NK0005-pub:!ban { nickname userhost handle channel text } {
  356. global botnick
  357. set NK0005-pub:!ban-addresses ""
  358. if { [llength $text] == 0 } {
  359. putquick "NOTICE $nickname : Syntax : !ban <nickname1/address1> \[nickname2/address2\]..."
  360. } else {
  361. if { [botisop $channel] == 1 } {
  362. for { set i 0 } { $i < [llength $text] } { incr i } {
  363. if { [string match -nocase "*!*" [lindex $text $i]] == 0 } {
  364. if { [isbotnick [lindex $text $i]] == 0 && [ischanban [maskhost [getchanhost [lindex $text $i]]] $channel] == 0 } {
  365. pushmode $channel +b [maskhost [getchanhost [lindex $text $i]]]
  366. set NK0005-pub:!ban-addresses "${NK0005-pub:!ban-addresses} [maskhost [getchanhost [lindex $text $i]]]"
  367. }
  368. } else {
  369. if { [string match -nocase "[lindex $text $i]" $botnick*!*[getchanhost $botnick]] == 0 && [ischanban [lindex $text $i] $channel] == 0 } {
  370. pushmode $channel +b [lindex $text $i]
  371. set NK0005-pub:!ban-addresses "${NK0005-pub:!ban-addresses} [lindex $text $i]"
  372. }
  373. }
  374. }
  375. putquick "NOTICE $nickname : Banning ([llength ${NK0005-pub:!ban-addresses}]) ${NK0005-pub:!ban-addresses} On $channel"
  376. } else {
  377. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  378. }
  379. }
  380. }
  381.  
  382. ##### Unban Command #####
  383.  
  384.  
  385. proc NK0005-pub:!unban { nickname userhost handle channel text } {
  386. global botnick
  387. set NK0005-pub:!unban-addresses ""
  388. if { [llength $text] == 0 } {
  389. putquick "NOTICE $nickname : Syntax : !unban <nickname1/address1> \[nickname2/address2\]..."
  390. } else {
  391. if { [botisop $channel] == 1 } {
  392. for { set i 0 } { $i < [llength $text] } { incr i } {
  393. if { [string match -nocase "*!*" [lindex $text $i]] == 0 } {
  394. if { [ischanban [maskhost [getchanhost [lindex $text $i]]] $channel] == 1 } {
  395. pushmode $channel -b [maskhost [getchanhost [lindex $text $i]]]
  396. set NK0005-pub:!unban-addresses "${NK0005-pub:!unban-addresses} [maskhost [getchanhost [lindex $text $i]]]"
  397. }
  398. } else {
  399. if { [ischanban [lindex $text $i] $channel] == 1 } {
  400. pushmode $channel -b [lindex $text $i]
  401. set NK0005-pub:!unban-addresses "${NK0005-pub:!unban-addresses} [lindex $text $i]"
  402. }
  403. }
  404. }
  405. putquick "NOTICE $nickname : Unbanning ([llength ${NK0005-pub:!unban-addresses}]) ${NK0005-pub:!unban-addresses} From $channel"
  406. } else {
  407. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  408. }
  409. }
  410. }
  411.  
  412. ##### Kick Command #####
  413.  
  414.  
  415. proc NK0005-pub:!kick { nickname userhost handle channel text } {
  416. global botnick
  417. set NK0005-pub:!kick-nicks ""
  418. if { [llength $text] == 0 } {
  419. putquick "NOTICE $nickname : Syntax : !kick <nickname1> \[nickname2\]..."
  420. } else {
  421. if { [botisop $channel] == 1 } {
  422. for { set i 0 } { $i < [llength $text] } { incr i } {
  423. if { [onchan [lindex $text $i] $channel] == 1 && [isbotnick [lindex $text $i]] == 0 } {
  424. putquick "KICK $channel [lindex $text $i]"
  425. set NK0005-pub:!kick-nicks "${NK0005-pub:!kick-nicks} [lindex $text $i]"
  426. }
  427. }
  428. putquick "NOTICE $nickname : Kicking ([llength ${NK0005-pub:!kick-nicks}]) ${NK0005-pub:!kick-nicks} From $channel"
  429. } else {
  430. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  431. }
  432. }
  433. }
  434.  
  435. ##### Kick Ban Command #####
  436.  
  437.  
  438. proc NK0005-pub:!kickban { nickname userhost handle channel text } {
  439. global botnick
  440. if { [llength $text] == 0 } {
  441. putquick "NOTICE $nickname : Syntax : !kickban <nickname> \[reason\]"
  442. } else {
  443. if { [botisop $channel] == 1 } {
  444. if { [onchan [lindex $text 0] $channel] == 1 } {
  445. putkick $channel [lindex $text 0] [lrange $text 1 end]
  446. if { [ischanban [maskhost [getchanhost [lindex $text 0]]] $channel] == 0 } {
  447. pushmode $channel +b [maskhost [getchanhost [lindex $text 0]]]
  448. putquick "NOTICE $nickname : Kicking And Banning [lindex $text 0] With Address : [maskhost [getchanhost [lindex $text 0]]] From $channel"
  449. } else {
  450. putquick "NOTICE $nickname : Kicking [lindex $text 0] From $channel"
  451. }
  452. } else {
  453. putquick "NOTICE $nickname : [lindex $text 0] Is Not On $channel"
  454. }
  455. } else {
  456. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  457. }
  458. }
  459. }
  460.  
  461. ##### Topic Command #####
  462.  
  463.  
  464. proc NK0005-pub:!topic { nickname userhost handle channel text } {
  465. global botnick
  466. if { [llength $text] == 0 } {
  467. putquick "NOTICE $nickname : Syntax : !topic <topic>"
  468. } else {
  469. if { [botisop $channel] == 1 || [string match "*t*" [lindex [getchanmode $channel] 0]] == 0 } {
  470. putquick "TOPIC $channel $text"
  471. putquick "NOTICE $nickname : Changing Topic Of $channel To : $text"
  472. } else {
  473. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel And $channel Is In +t Mode"
  474. }
  475. }
  476. }
  477.  
  478. ##### Clear Ops Command #####
  479.  
  480.  
  481. proc NK0005-pub:!clearops { nickname userhost handle channel text } {
  482. global botnick
  483. if { [llength $text] != 0 } {
  484. putquick "NOTICE $nickname : Syntax : !clearops"
  485. } else {
  486. if { [botisop $channel] == 1 } {
  487. putquick "NOTICE $nickname : Clearing Ops For $channel"
  488. for { set i 0 } { $i < [llength [chanlist $channel]] } { incr i } {
  489. if { [isop [lindex [chanlist $channel] $i] $channel] == 1 } {
  490. if { [nick2hand [lindex [chanlist $channel] $i]] == "*" || ([isbotnick [lindex [chanlist $channel] $i]] == 0 && [string match -nocase "*[nick2hand [lindex [chanlist $channel] $i]]*" [bots]] == 0 && [matchattr [nick2hand [lindex [chanlist $channel] $i]] n] == 0) } {
  491. pushmode $channel -o [lindex [chanlist $channel] $i]
  492. }
  493. }
  494. }
  495. } else {
  496. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  497. }
  498. }
  499. }
  500.  
  501. ##### Clear Voice Command #####
  502.  
  503.  
  504. proc NK0005-pub:!clearvoice { nickname userhost handle channel text } {
  505. global botnick
  506. if { [llength $text] != 0 } {
  507. putquick "NOTICE $nickname : Syntax : !clearvoice"
  508. } else {
  509. if { [botisop $channel] == 1 } {
  510. putquick "NOTICE $nickname : Clearing Voice For $channel"
  511. for { set i 0 } { $i < [llength [chanlist $channel]] } { incr i } {
  512. if { [isop [lindex [chanlist $channel] $i] $channel] == 1 } {
  513. if { [nick2hand [lindex [chanlist $channel] $i]] == "*" || ([isbotnick [lindex [chanlist $channel] $i]] == 0 && [string match -nocase "*[nick2hand [lindex [chanlist $channel] $i]]*" [bots]] == 0 && [matchattr [nick2hand [lindex [chanlist $channel] $i]] n] == 0) } {
  514. pushmode $channel -v [lindex [chanlist $channel] $i]
  515. }
  516. }
  517. }
  518. } else {
  519. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  520. }
  521. }
  522. }
  523.  
  524. ##### Clear Bans Command #####
  525.  
  526.  
  527. proc NK0005-pub:!clearbans { nickname userhost handle channel text } {
  528. global botnick
  529. if { [llength $text] != 0 } {
  530. putquick "NOTICE $nickname : Syntax : !clearbans"
  531. } else {
  532. if { [botisop $channel] == 1 } {
  533. putquick "NOTICE $nickname : Clearing Bans For $channel"
  534. for { set i 0 } { $i < [llength [chanbans $channel]] } { incr i } {
  535. pushmode $channel -b [lindex [lindex [chanbans $channel] $i] 0]
  536. }
  537. } else {
  538. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  539. }
  540. }
  541. }
  542.  
  543. ##### Clear Command #####
  544.  
  545.  
  546. proc NK0005-pub:!clear { nickname userhost handle channel text } {
  547. global botnick
  548. if { [llength $text] > 1 || ([string match -nocase "TAKEOVER" [lindex $text 0]] == 0 && [llength $text] == 1) } {
  549. putquick "NOTICE $nickname : Syntax : !clear \[TAKEOVER\]"
  550. } else {
  551. if { [botisop $channel] == 1 } {
  552. putquick "NOTICE $nickname : Clearing Channel...$channel"
  553. NK0005-pub:!clearops $nickname $userhost $handle $channel
  554. NK0005-pub:!clearvoice $nickname $userhost $handle $channel
  555. NK0005-pub:!clearbans $nickname $userhost $handle $channel
  556. if { [string match -nocase "TAKEOVER" [lindex $text 0]] == 1 } {
  557. putquick "MODE $channel +bntimslk *!*@* 1 [rand 99999]"
  558. for { set i 0 } { $i < [llength [chanlist $channel]] } { incr i } {
  559. if { [lindex [chanlist $channel] $i] != "$nickname" && [isbotnick [lindex [chanlist $channel] $i]] == 0 } {
  560. putkick $channel [lindex [chanlist $channel] $i]
  561. }
  562. }
  563. }
  564. } else {
  565. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  566. }
  567. }
  568. }
  569.  
  570. ##### Mode Command #####
  571.  
  572.  
  573. proc NK0005-pub:!mode { nickname userhost handle channel text } {
  574. global botnick
  575. if { [llength $text] == 0 } {
  576. putquick "NOTICE $nickname : Syntax : !mode <modes> \[parameters\]"
  577. } else {
  578. if { [botisop $channel] == 1 } {
  579. putquick "MODE $channel [lindex $text 0] [lrange $text 1 end]"
  580. putquick "NOTICE $nickname : Attempting To Change Modes To : $text"
  581. } else {
  582. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  583. }
  584. }
  585. }
  586.  
  587. ##### Invite User #####
  588.  
  589.  
  590. proc NK0005-pub:!invite { nickname userhost handle channel text } {
  591. global botnick
  592. set NK0005-pub:!invite-nicks ""
  593. if { [llength $text] == 0 } {
  594. putquick "NOTICE $nickname : Syntax : !invite <nickname1> \[nickname2\]..."
  595. } else {
  596. if { [botisop $channel] == 1 } {
  597. for { set i 0 } { $i < [llength $text] } { incr i } {
  598. if { [onchan [lindex $text $i] $channel] == 0 } {
  599. putquick "INVITE [lindex $text $i] $channel"
  600. set NK0005-pub:!invite-nicks "${NK0005-pub:!invite-nicks} [lindex $text $i]"
  601. }
  602. }
  603. putquick "NOTICE $nickname : Inviting ([llength ${NK0005-pub:!invite-nicks}]) ${NK0005-pub:!invite-nicks} To $channel"
  604. } else {
  605. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  606. }
  607. }
  608. }
  609.  
  610. ##### Kick With Reason Command #####
  611.  
  612.  
  613. proc NK0005-pub:!kickr { nickname userhost handle channel text } {
  614. global botnick
  615. if { [llength $text] == 0 } {
  616. putquick "NOTICE $nickname : Syntax : !kickr <nickname> \[reason\]..."
  617. } else {
  618. if { [botisop $channel] == 1 } {
  619. if { [onchan [lindex $text 0] $channel] == 1 } {
  620. if { [isbotnick [lindex $text 0]] == 0 } {
  621. putkick $channel [lindex $text 0] [lrange $text 1 end]
  622. putquick "NOTICE $nickname : Kicking [lindex $text 0] From $channel With Reason : [lrange $text 1 end]"
  623. } else {
  624. putquick "NOTICE $nickname : I Will Not Kick Myself"
  625. }
  626. } else {
  627. putquick "NOTICE $nickname : [lindex $text 0] Is Not On $channel"
  628. }
  629. } else {
  630. putquick "NOTICE $nickname : Sorry, But I ($botnick) Am Not Opped On $channel"
  631. }
  632. }
  633. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement