Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 87.03 KB | None | 0 0
  1. namespace eval GB {
  2.  
  3. # Salon de log #
  4. set ::log "#Op-Trip"
  5. # Auteur TCL #
  6. set ::auteur "alias_angelius"
  7. # Version TCL #
  8. set ::GBversion "Gestion.Bot 1.2"
  9. # Raison kick Blacklist #
  10. set ::bl "\0034Tu es banni du salon. \00314( \0031Blackliste\00314 )"
  11. # Raison kick Protect Kick #
  12. set ::protectk "\00314Anti-Kick\00314 \0034Attention \0031le Pseudo et dans la liste des \0034Protégés.\0034"
  13. # Raison kick Protect Devoice #
  14. set ::protectv "\00314Anti-Devoice\00314 \0034Attention \0031le Pseudo et dans la liste des \0034Protégés.\0034"
  15. # Raison kick Protect Deop #
  16. set ::protectd "\00314Anti-Deop\00314 \0034Attention \0031le Pseudo et dans la liste des \0034Protégés.\0034"
  17. # Raison Kick par défault #
  18. set ::kick "Vous venez d'être kické par"
  19. # Raison kick Notice-Chan #
  20. set ::nt "~ Exp/Notice-Chan ~ Pas de notice salon svp"
  21.  
  22. # PL #
  23.  
  24. bind chon - * [namespace current]::opco
  25. proc opco {hand idx} {
  26. global auth
  27. putquick "privmsg $::log :\0031\[\00312Connection\0031\] \0034$hand \0033vien de se connecter a la \0036Party-Line.\0036"
  28. dccbroadcast "\00312Connection PL Autorisé pour \0034$hand\0034"
  29. }
  30.  
  31. bind chof - * [namespace current]::opdeco
  32. proc opdeco {hand idx} {
  33. global auth
  34. putquick "privmsg $::log :\0031\[\00312Déconection\0031\] \0034$hand \0033vien de se déconecter de la \0036Part-Line.\0036"
  35. dccbroadcast "\00312Déconnection PL pour \0034$hand\0034"
  36. }
  37.  
  38. # Auth #
  39.  
  40. bind MSG - "auth" [namespace current]::auth
  41. proc auth { nick host hand text } {
  42. set args [split $text]
  43. if {[llength $args] != 2} {
  44. puthelp "notice $nick :\002Erreur :\002 /msg $::botnick auth <pseudo> <pass>"
  45. return
  46. }
  47. set pseudo [lindex $args 0]
  48. set password [lindex $args 1]
  49. if {![validuser $pseudo]} {
  50. puthelp "notice $nick :\002Erreur :\002 $pseudo n'a aucun access sur le robot."
  51. return
  52. }
  53.  
  54. if {![passwdok $pseudo $password]} {
  55. puthelp "notice $nick :\002Erreur :\002 Votre mot de pass ou/et votre pseudo est/sont incorrect(s) !"
  56. return
  57. }
  58.  
  59. if {![string match -nocase [finduser $nick!$host] $pseudo]} {
  60. puthelp "notice $nick :\002Erreur :\002 Votre host ne correspond pas avec votre access !"
  61. return
  62. }
  63.  
  64. if {[getuser $pseudo XTRA AUTH] eq "ON"} {
  65. puthelp "notice $nick :\002Erreur :\002 Vous êtes déjà authentifier !"
  66. return
  67. }
  68.  
  69. if {[getuser $hand XTRA SUSPEND] eq "ON"} {
  70. puthelp "notice $nick :\002Erreur :\002 Vous êtes suspendu !"
  71. return
  72. }
  73.  
  74. puthelp "notice $nick :\0031\[AUTHENTIFICATION REUSSIE\]\0031 Vous êtes maintenant authentifié !"
  75. putserv "privmsg $::log :\00314Commande \0036Auth par \0031: \0034$hand"
  76. putquick "INVITE $nick $::log"
  77. setuser $pseudo XTRA AUTH ON;
  78. setuser $hand XTRA SEEN [clock format [clock seconds] -format "le %d/%m/%Y à %Hh%M"]
  79. save
  80. return
  81. }
  82.  
  83. # Deauth #
  84.  
  85. bind MSG - "deauth" [namespace current]::deauth
  86. proc deauth { nick host hand arg } {
  87. if {[getuser $hand XTRA auth] eq "ON"} {
  88. puthelp "notice $nick :\0031\[DEAUTHENTIFICATION REUSSIE\]\0031 Vous êtes maintenant deauthentifié !"
  89. putserv "privmsg $::log :\00314Commande \0036Deauth par \0031: \0034$hand"
  90. setuser $hand XTRA AUTH OFF;
  91. save
  92. return
  93. }}
  94.  
  95. # Isauth #
  96.  
  97. proc [namespace current]::isauth {hand} {
  98. if {[getuser $hand XTRA AUTH] eq "OFF"} {return 0}
  99. if {[getuser $hand XTRA AUTH] eq "ON"} {return 1}
  100. }
  101.  
  102. # Addsuspend #
  103.  
  104. bind msg - "addsuspend" [namespace current]::addsuspend
  105. proc addsuspend {nick host hand arg} {
  106. global auth
  107. if {![matchattr $hand o|]} {
  108. putquick "PRIVMSG $::log :\0033\[ADDSUSPEND\]\0033 \002$hand\002 a essayé d'utiliser cette commande mais il n'a pas les flags nécessaire."
  109. putserv "NOTICE $nick :\002Accès refusé\002 Vous n'avez pas access à cette commande."
  110. return 0
  111. }
  112.  
  113. set arg [split $arg]
  114. set login [lindex $arg 0]
  115. if {$login==""} {
  116. puthelp "notice $nick :\002/msg $botnick addsuspend\002<login>"
  117. puthelp "notice $nick :\002Exemple :\002/msg $botnick addsuspend alias_angelius"
  118. return 0
  119. }
  120.  
  121. if {![validuser $login]} {
  122. puthelp "notice $nick :\002ADDSUSPEND\002: Le login \002$login\002 a aucun accès."
  123. return 0
  124. }
  125.  
  126. if {[getuser $login XTRA suspend]=="ON"} {
  127. puthelp "notice $nick :\002ADDSUSPEND\002: Le login \002$login\002 est déjà suspendu."
  128. return 0
  129. }
  130.  
  131. setuser $login XTRA SUSPEND ON
  132. puthelp "notice $nick :\002ADDSUSPEND\002: \002$login\002 a été suspendu."
  133. putserv "privmsg $::log :\00314Commande \0036Addsuspend ajouté par \0031: \0034$hand pour $login"
  134. }
  135.  
  136. # Delsuspend #
  137.  
  138. bind msg - "delsuspend" [namespace current]::delsuspend
  139. proc delsuspend {nick host hand arg} {
  140. global botnick
  141. if {![matchattr $hand o|]} {
  142. putquick "PRIVMSG $::log :\0033\[DELSUSPEND\]\0036 \002$hand\002 a essayé d'utiliser cette commande mais il n'a pas les flags nécessaire."
  143. puthelp "notice $nick :\002Accès refusé\002 Vous n'avez pas access à cette commande."
  144. return 0
  145. }
  146.  
  147. set arg [split $arg]
  148. set login [lindex $arg 0]
  149. if {$login==""} {
  150. puthelp "notice $nick :\002/msg $botnick delsuspend\002<login>"
  151. puthelp "notice $nick :\002Exemple :\002/msg $botnick delsuspend alias_angelius"
  152. return 0
  153. }
  154.  
  155. if {![validuser $login]} {
  156. puthelp "notice $nick :\002DELSUSPEND\002 : Le login \002$login\002 a aucun accès."
  157. return 0
  158. }
  159.  
  160. if {[getuser $login XTRA suspend]=="OFF"} {
  161. puthelp "notice $nick :\002DELSUSPEND\002 : Le login \002$login\002 n'est pas suspendu."
  162. return 0
  163. }
  164.  
  165. setuser $login XTRA SUSPEND OFF
  166. puthelp "notice $nick :\002DELSUSPEND\002 : \002$login\002 n'est plus suspendu."
  167. putserv "privmsg $::log :\00314Commande \0036Delsuspend retiré par \0031: \0034$hand pour $login"
  168. }
  169.  
  170. # Deauth Part #
  171.  
  172. bind part o|o "partdeauth *" [namespace current]::partdeauth
  173. proc partdeauth { nick uhost hand chan {msg ""}} {
  174. if [matchattr $hand o|o $chan] && [isauth $hand] {
  175. setuser $hand XTRA AUTH OFF
  176. puthelp "notice $nick :Déauthentification suite a votre part du salon.."
  177. putserv "privmsg $::log :\00314Déauthentification \0036suite au part de \0031: \0034$hand"
  178. }}
  179.  
  180. # Deauth Quit #
  181.  
  182. bind sign o|o "quitdeauth *" [namespace current]::quitdeauth
  183. proc quitdeauth { nick uhost hand chan {msg ""}} {
  184. if [matchattr $hand o|o $chan] && [isauth $hand] {
  185. setuser $hand XTRA AUTH OFF
  186. putserv "privmsg $::log :\00314Déauthentification \0036suit au quit de \0031: \0034$hand"
  187. }}
  188.  
  189. # Deauth Join #
  190.  
  191. bind join - "$::log*" [namespace current]::joindeauth
  192. proc joindeauth {nick host hand chan} {
  193. if {$nick=="$::botnick"} {
  194. putserv "PRIVMSG $::log :\0034Réinitialisation des accès, tous les authentifiés ont été deauth par sécurité.\0034"
  195. foreach user [userlist * $chan] {
  196. setuser $user XTRA AUTH OFF
  197. }}}
  198.  
  199. # Blacklist #
  200.  
  201. # Création et Gestion Db #
  202.  
  203. if {![file exist database/blacklist.db]} {
  204. set load [open database/blacklist.db w+]
  205. close fcreate
  206. putlog "\2Je créé le blacklist.db\2"
  207. }
  208.  
  209. if {![file exist database/exempt.db]} {
  210. set load [open database/exempt.db w+]
  211. close fcreate
  212. putlog "\2Je créé le exempt.db\2"
  213. }
  214.  
  215. proc progfile {file action arg} {
  216. set return 0
  217. set dbr [open database/$file.db r+]
  218. set dbw [open tmp.tmp w+]
  219. while {![eof $dbr]} {
  220. set r [gets $dbr]
  221. if {$r!=""} {puts $dbw $r}
  222. }
  223. close $dbr
  224. close $dbw
  225. set dbr [open tmp.tmp r+]
  226. set dbw [open database/$file.db w+]
  227. while {![eof $dbr]} {
  228. set r [gets $dbr]
  229. if {$action=="add"} {
  230. if {$r!=""} {
  231. puts $dbw $r
  232. } else {
  233. puts $dbw $arg
  234. }
  235. set return 1
  236. }
  237. if {$action=="del"} {
  238. if {$r!=""} {
  239. if {![string match -nocase $arg [lindex $r 0]] && ![string match -nocase $arg [lindex $r 1]]} {
  240. puts $dbw $r
  241. } else {
  242. set return 1
  243. }
  244. }
  245. }
  246. if {$action=="chk"} {
  247. if {$r!=""} {
  248. puts $dbw $r
  249. if [string match -nocase [lindex $arg 0] [lindex $r 1]] {
  250. set return [lindex $r 0]
  251. if ![string match -nocase [lindex $arg 1] [lindex $r 2]] {set return 2}
  252. if ![string match [lindex $arg 2] [lindex $r 3]] {set return 3}
  253. }
  254. }
  255. }
  256. if {$action=="icr"} {
  257. if {$r!=""} {
  258. puts $dbw $r
  259. if [string match -nocase $arg [lindex $r 0]] {
  260. set return 1
  261. }
  262. }
  263. }
  264. if {$action=="cf"} {
  265. if {$r!=""} {
  266. puts $dbw $r
  267. if [string match -nocase [lindex $r 0] $arg] {
  268. set return 1
  269. }
  270. }
  271. }
  272. if {$action=="ibr"} {
  273. if {$r!=""} {
  274. puts $dbw $r
  275. if [string match -nocase $arg [lindex $r 1]] {
  276. set return 1
  277. }
  278. }
  279. }
  280.  
  281. }
  282. close $dbr
  283. close $dbw
  284. return $return
  285. }
  286.  
  287. # Add blacklist #
  288.  
  289. bind pub o| ".+blacklist" [namespace current]::+blacklist
  290. proc +blacklist {nick uhost hand chan args} {
  291. set verifexempt "[split [lindex $args 0] |]"
  292. set nickverife "[lindex $verifexempt 0]"
  293. if {[lindex $args 0]!=""} {
  294. if {[progfile blacklist icr $nickverife]!="0"} {
  295. putserv "notice $nick :Attention le Nick: \2$nickverife\2 est déjà dans la Blacklist ou ne peux etre Blackliste."
  296. return 0
  297. }
  298. if {[progfile exempt icr $nickverife]!="0"} {
  299. putserv "notice $nick :Attention le Nick: \2$nickverife\2 Ne peux être ajouter a la Blackliste."
  300. return 0
  301. }
  302. progfile blacklist add $nickverife
  303. putserv "notice $nick :Le Nick: \2$nickverife\2 a bien été ajouté à la blacklist."
  304. putquick "PRIVMSG $chan :\00314Le pseudo\002\0031 $nickverife\002 \00314a bien était ajouter au pseudo des (\0034Blackliste\00314)"
  305. putserv "privmsg $::log :\00314Commande \0036Blacklist ajouté par \0031: \0034$hand"
  306. return
  307. } else {
  308. puthelp "PRIVMSG $chan :Il faut une victime"
  309. return
  310. }}
  311.  
  312. # Del Blacklist #
  313.  
  314. bind pub o| ".-blacklist" [namespace current]::-blacklist
  315. proc -blacklist {nick uhost hand chan args} {
  316. set verifexempt "[split [lindex $args 0] |]"
  317. set nickverife "[lindex $verifexempt 0]"
  318. if {[lindex $args 0]!=""} {
  319. if {[progfile blacklist del $nickverife]!="1"} {
  320. putserv "notice $nick :Attention le Nick: \2$nickverife\2 n'est pas dans la Blacklist."
  321. return 0
  322. }
  323. progfile blacklist del $nickverife
  324. putserv "notice $nick :Le Nick: \2$nickverife\2 a bien été supprimé de la blacklist."
  325. putquick "PRIVMSG $chan :\00314Le pseudo\002\0031 $nickverife\002 \00314a bien était retiré au pseudo des (\0034Blackliste\00314)"
  326. putserv "privmsg $::log :\00314Commande \0036Blacklist retiré par \0031: \0034$hand"
  327. return
  328. } else {
  329. puthelp "PRIVMSG $chan :Il faut une victime"
  330. return
  331. }}
  332.  
  333. # List Blacklist #
  334.  
  335. bind pub o| ".blacklist" [namespace current]::.blacklist
  336. proc .blacklist {nick uhost hand chan args} {
  337. set nickb [lindex $args 0]
  338. set blusers [open database/blacklist.db r]
  339. putserv "notice $nick :\2Voici la Blacklist:\2"
  340. putserv "notice $nick :\2\2"
  341. while {![eof $blusers]} {
  342. set bluser [gets $blusers]
  343. if {$bluser!="" && $nickb==""} {
  344. putserv "notice $nick :\2Nick:\2 $bluser"
  345. } elseif [string match -nocase $nickb $bluser] {
  346. putserv "notice $nick :\2Nick:\2 $bluser."
  347. }
  348. }
  349. putserv "notice $nick :\2Fin de la Blacklist\2."
  350. putserv "privmsg $::log :\00314Commande \0036Blacklist par \0031: \0034$hand"
  351. close $blusers
  352. putserv "notice $nick :\2\2"
  353. }
  354.  
  355. # Add Exempt #
  356.  
  357. bind pub o| ".+exempt" [namespace current]::+exempt
  358. proc +exempt {nick uhost hand chan args} {
  359. set verifexempt "[split [lindex $args 0] |]"
  360. set nickverife "[lindex $verifexempt 0]"
  361. if {[lindex $args 0]!=""} {
  362. if {[progfile exempt icr $nickverife]!="0"} {
  363. putserv "notice $nick :Attention le Nick: \2$nickverife\2 est déjà dans la liste des protégés."
  364. return 0
  365. }
  366. progfile exempt add $nickverife
  367. putserv "notice $nick :Le Nick: \2$nickverife\2 a bien été ajouté à la liste des protégés."
  368. putquick "PRIVMSG $chan :\00314Le pseudo\002\0031 $nickverife\002 \00314a bien était ajouter au pseudo des (\0034Protégés\00314)"
  369. putserv "privmsg $::log :\00314Commande \0036Exempt ajouté par \0031: \0034$hand"
  370. return
  371. } else {
  372. puthelp "PRIVMSG $chan :Il faut une victime"
  373. return
  374. }}
  375.  
  376. # Del Exempt #
  377.  
  378. bind pub o| ".-exempt" [namespace current]::-exempt
  379. proc -exempt {nick uhost hand chan args} {
  380. set verifexempt "[split [lindex $args 0] |]"
  381. set nickverife "[lindex $verifexempt 0]"
  382. if {[lindex $args 0]!=""} {
  383. if {[progfile exempt del $nickverife]!="1"} {
  384. putserv "notice $nick :Attention le Nick: \2$nickverife\2 n'est pas dans la liste des protégés."
  385. return 0
  386. }
  387. progfile exempt del $nickverife
  388. putserv "notice $nick :Le Nick: \2$nickverife\2 a bien été supprimé de la listes des protégés."
  389. putquick "PRIVMSG $chan :\00314Le pseudo\002\0031 $nickverife\002 \00314a bien était retiré au pseudo des (\0034Protégés\00314)"
  390. putserv "privmsg $::log :\00314Commande \0036Exempt retiré par \0031: \0034$hand"
  391. return
  392. } else {
  393. puthelp "PRIVMSG $chan :Il faut une victime"
  394. return
  395. }}
  396.  
  397. # List Exempt #
  398.  
  399. bind pub o| ".exempt" [namespace current]::.exempt
  400. proc .exempt {nick uhost hand chan args} {
  401. set nickb [lindex $args 0]
  402. set blusers [open database/exempt.db r]
  403. putserv "notice $nick :\2Voici la ExemptList:\2"
  404. putserv "notice $nick :\2\2"
  405. while {![eof $blusers]} {
  406. set bluser [gets $blusers]
  407. if {$bluser!="" && $nickb==""} {
  408. putserv "notice $nick :\2Nick:\2 $bluser"
  409. } elseif [string match -nocase $nickb $bluser] {
  410. putserv "notice $nick :\2Nick:\2 $bluser."
  411. }
  412. }
  413. putserv "notice $nick :\2Fin de la ExemptList\2."
  414. putserv "privmsg $::log :\00314Commande \0036Exempt par \0031: \0034$hand"
  415. close $blusers
  416. putserv "notice $nick :\2\2"
  417. }
  418.  
  419. # Join #
  420.  
  421. bind join - "*" [namespace current]::xbl
  422. proc xbl {n u h c} {
  423. set k [lindex [split $n |] 0]
  424. if {[progfile blacklist cf $k]=="1"} {
  425. set vnick $n
  426. set hostmask "[split [getchanhost $vnick $c] @]"
  427. set hostmask "!*@*[lindex $hostmask 1]"
  428. putquick "MODE $c +bbb $hostmask $k!*@* $k|*!*@*"
  429. putquick "KICK $c $vnick : $::bl"
  430. }}
  431.  
  432. # Protection #
  433.  
  434. # Kick Protection #
  435.  
  436. bind kick - * [namespace current]::kickpro
  437. proc kickpro { nick uhost hand chan target reason } {
  438. global auth
  439. set verifexempt "[split [lindex $target 0] |]"
  440. set nickverife "[lindex $verifexempt 0]"
  441. set host [lindex [split $uhost @] 1]
  442. set vnick [lindex $target 0]
  443. set chrch [lindex [split $nick |] 0]
  444. if {[progfile exempt cf $chrch]=="0"} {
  445. if {[progfile exempt icr $nickverife]!="0"} {
  446. putquick "mode $chan +b *!*@$host"
  447. putserv "kick $chan $nick :$::protectk"
  448. }
  449. pushmode $chan +o $vnick
  450. }}
  451.  
  452. # Devoice Protection #
  453.  
  454. bind mode - "* -v" [namespace current]::prodev
  455. proc prodev { nick uhost hand chan mc target } {
  456. set verifexempt "[split [lindex $target 0] |]"
  457. set nickverife "[lindex $verifexempt 0]"
  458. set host [lindex [split $uhost @] 1]
  459. set vnick [lindex $target 0]
  460. set chrch [lindex [split $nick |] 0]
  461. if {[progfile exempt cf $chrch]=="0"} {
  462. if {[progfile exempt icr $nickverife]!="0"} {
  463. putquick "mode $chan +b *!*@$host"
  464. putserv "kick $chan $nick :$::protectv"
  465. }
  466. pushmode $chan +v $vnick
  467. return 0
  468. }}
  469.  
  470. # Deop Protection #
  471.  
  472. bind mode - "* -o" [namespace current]::prodeop
  473. proc prodeop { nick uhost hand chan mc target } {
  474. set verifexempt "[split [lindex $target 0] |]"
  475. set nickverife "[lindex $verifexempt 0]"
  476. set host [lindex [split $uhost @] 1]
  477. set vnick [lindex $target 0]
  478. set chrch [lindex [split $nick |] 0]
  479. if {[progfile exempt cf $chrch]=="0"} {
  480. if {[progfile exempt icr $nickverife]!="0"} {
  481. putquick "mode $chan +b *!*@$host"
  482. putserv "kick $chan $nick :$::protectd"
  483. pushmode $chan +o $target
  484. return 0
  485. }}}
  486.  
  487. # AddChan/DelChan/ListChan Msg #
  488.  
  489. bind msg - "addchan" [namespace current]::addchan
  490. proc addchan { nick host hand text } {
  491. global auth
  492. set chan [lindex $text 0]
  493. set chans [join [lrange [split $text] 0 0]]
  494. set pseudo [split $nick |]
  495. if {![validuser [lindex $pseudo 0]]} {
  496. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  497. return
  498. }
  499. if {![isauth $hand]} {
  500. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  501. return
  502. }
  503. if {$text==""} {
  504. puthelp "notice $nick :Addchan incorrect ! Veuillez respecter la syntaxe suivante : /msg $::botnick addchan <#salon> !"
  505. }
  506. if ![matchattr $hand o| [lindex $text 0]] {
  507. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'utilisation de cette commande (SuperOp sur $::botnick requis) !"
  508. return
  509. }
  510. if {[string match -nocase $chans $chan]} {
  511. putserv "privmsg $::log :\00314Commande \0036Addchan par \0031: \0034$hand"
  512. putserv "notice $nick :$chans Rajouter au Addchan !"
  513. channel add $chans
  514. savechannels
  515. return
  516. }
  517. if {[lsearch [channels] $chans]==-1} {
  518. puthelp "notice $nick :$chans existe déja dans la liste des addchan"
  519. return
  520. }}
  521.  
  522. # Delchan #
  523.  
  524. bind msg - "delchan" [namespace current]::delchan
  525. proc delchan { nick host hand text } {
  526. global auth
  527. set chan [lindex $text 0]
  528. set chans [join [lrange [split $text] 0 0]]
  529. set pseudo [split $nick |]
  530. if {![validuser [lindex $pseudo 0]]} {
  531. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  532. return
  533. }
  534. if {![isauth $hand]} {
  535. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  536. return
  537. }
  538. if {$text==""} {
  539. puthelp "notice $nick :Addchan incorrect ! Veuillez respecter la syntaxe suivante : /msg $::botnick delchan <#salon> !"
  540. }
  541. if ![matchattr $hand o| [lindex $text 0]] {
  542. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'utilisation de cette commande (SuperOp sur $::botnick requis) !"
  543. return
  544. }
  545. if {[lsearch [channels] $chans]==-1} {
  546. puthelp "notice $nick :Je ne suis pas sur $chans !"
  547. return
  548. }
  549. if {[string match -nocase $chans $chan]} {
  550. putserv "privmsg $::log :\00314Commande \0036Delchan par \0031: \0034$hand"
  551. putserv "notice $nick :$chans Retiré des Addchan !"
  552. channel remove $chans
  553. savechannels
  554. return
  555. }}
  556.  
  557. # ListChan #
  558.  
  559. bind msg - "listchan" [namespace current]::listchan
  560. proc listchan { nick host hand text } {
  561. global auth
  562. set chan [lindex $text 0]
  563. set chans [join [lrange [split $text] 0 0]]
  564. set pseudo [split $nick |]
  565. if {![validuser [lindex $pseudo 0]]} {
  566. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  567. return
  568. }
  569. if {![isauth $hand]} {
  570. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  571. return
  572. }
  573. if ![matchattr $hand o| [lindex $text 0]] {
  574. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'utilisation de cette commande (SuperOp sur $::botnick requis) !"
  575. return
  576. }
  577. if {[string match -nocase $chans $chan]} {
  578. set voir 1
  579. putquick "privmsg $nick :\0034\[Liste Salons\]"
  580. foreach liste [channels] {
  581. putquick "privmsg $nick :\0037=>\0032 $voir \0037<= \0033 $liste"
  582. incr voir 1
  583. }
  584. putquick "privmsg $nick :\0036\[Fin De Liste\]"
  585. putserv "privmsg $::log :\00314Commande \0036Listchan par \0031: \0034$hand"
  586. return
  587. }
  588. if {[lsearch [channels] $chans]==-1} {
  589. puthelp "notice $nick :Je ne suis pas sur $chan !"
  590. return
  591. }}
  592.  
  593. # Access/Newpass #
  594.  
  595. bind MSG - "access" [namespace current]::access
  596. proc access { nick host hand text } {
  597. global auth
  598. set chan [lindex $text 0]
  599. set pseudo [split $nick |]
  600. set mask [lindex $text 1]
  601. if {![validuser [lindex $pseudo 0]]} {
  602. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  603. return
  604. }
  605.  
  606. if {![isauth $hand]} {
  607. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  608. return
  609. }
  610.  
  611. if ![string match #* $chan] {
  612. puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick access <#channel> <mask> )"
  613. return
  614. }
  615.  
  616. if {$mask==""} {
  617. puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick access <#channel> <mask> )"
  618. return
  619. }
  620.  
  621. if ![validchan $chan] {
  622. puthelp "notice $nick :Désolé, ce salon n'est pas enregistré !"
  623. return
  624. }
  625.  
  626. if ![matchattr $hand o|o [lindex $text 0]] {
  627. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'utilisation de cette commande (Opérateur sur [lindex $text 0] requis) !"
  628. return
  629. }
  630.  
  631. putserv "PRIVMSG $nick :Liste des access de $chan correspondant à \0031\[ \0034$mask \0031\] :"
  632. foreach user [userlist |n $chan] {
  633. if [string match -nocase $mask $user] {
  634. putserv "PRIVMSG $nick :Owner $user"
  635. }}
  636.  
  637. foreach user [userlist |m $chan] {
  638. if ![matchattr $user |n $chan]&&[string match -nocase $mask $user] {
  639. putserv "PRIVMSG $nick :Master $user"
  640. }}
  641.  
  642. foreach user [userlist |o $chan] {
  643. if ![matchattr $user |m $chan]&&[string match -nocase $mask $user] {
  644. putserv "PRIVMSG $nick :Operateur $user"
  645. }}
  646.  
  647. foreach user [userlist o|] {
  648. if [string match -nocase $mask $user] {
  649. putserv "privmsg $nick :SuperOp $user"
  650. }}
  651. putserv "PRIVMSG $nick :Fin de la liste d'access."
  652. putserv "privmsg $::log :\00314Commande \0036Access par \0031: \0034$hand"
  653. return
  654. }
  655.  
  656. # Newpass #
  657.  
  658. bind msg - "newpass" [namespace current]::newpass
  659. proc newpass { nick uhost hand text } {
  660. global auth
  661. set pseudo [split $nick |]
  662. set pseudo [lindex $pseudo 0]
  663. if {![validuser $pseudo]} {
  664. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  665. return
  666. }
  667.  
  668. if {![isauth $hand]} {
  669. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  670. return
  671. }
  672.  
  673. if {$text==""} {
  674. puthelp "notice $nick :Ancien mot de passe incorrect ! Veuillez respecter la syntaxe suivante : /msg $::botnick newpass <ancien-pass> <nouveau-pass> !"
  675. }
  676.  
  677. if {[getuser $hand PASS]==""} {
  678. setuser $hand PASS [lindex $text 0]
  679. puthelp "notice $nick :Mot de passe défini : [lindex $text 0] !"
  680. return
  681. }
  682.  
  683. if {[passwdok $hand [lindex $text 0]]} {
  684. if {[llength $text]>1} {
  685. setuser $hand PASS [lindex $text 1]
  686. puthelp "notice $nick :Nouveau mot de passe défini : [lindex $text 1] !"
  687. putserv "privmsg $::log :\00314Commande \0036Newpass par \0031: \0034$hand"
  688. return
  689. }}}
  690.  
  691. # Addop/Addmaster/Addowner/Addsuperop Msg #
  692.  
  693. bind MSG - "addop" [namespace current]::addop
  694. proc addop { nick host hand text } {
  695. global auth chan
  696. set vhand [lindex [split [lindex $text 0] |] 0]
  697. set chan [lindex $text 1]
  698. set pseudo [lindex [split $nick |] 0]
  699.  
  700. if ![validuser $pseudo] {
  701. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  702. return
  703. }
  704.  
  705. if ![isauth $hand] {
  706. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  707. return
  708. }
  709.  
  710. if {![string match #* $chan]} {
  711. puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick addop <pseudo> <#channel> )"
  712. return
  713. }
  714.  
  715. if ![validchan $chan] {
  716. puthelp "notice $nick :Désolé, ce salon n'est pas enregistré !"
  717. return
  718. }
  719.  
  720. if ![matchattr $hand o|m $chan] {
  721. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande (Master sur $chan requis) !"
  722. return
  723. }
  724.  
  725. if [matchattr $vhand |n $chan] {
  726. puthelp "notice $nick :Ce pseudo figure dans l'Access-List Owners sur $chan !"
  727. return
  728. }
  729.  
  730. if [matchattr $vhand |m $chan] {
  731. puthelp "notice $nick :Ce pseudo figure dans l'Access-List Masters sur $chan !"
  732. return
  733. }
  734.  
  735. if [matchattr $vhand |o $chan] {
  736. puthelp "notice $nick :Ce pseudo figure dans l'Access-List Opérateurs sur $chan !"
  737. return
  738. }
  739.  
  740. if [matchattr $vhand |m $chan] {
  741. puthelp "notice $nick :Ce pseudo figure dans l'Access-List Masters sur $chan !"
  742. return
  743. }
  744.  
  745. adduser $vhand $vhand!*@*
  746. setuser $vhand HOSTS $vhand|*!*@*
  747. chattr $vhand -h|+o $chan
  748. puthelp "notice $nick :$vhand a bien été ajouté(e) en tant qu'opérateur sur $chan !"
  749. putserv "privmsg $::log :\00314Commande \0036Addop par \0031: \0034$hand"
  750. }
  751.  
  752. # Addmaster #
  753.  
  754. bind MSG - "addmaster" [namespace current]::addmaster
  755. proc addmaster { nick uhost hand text } {
  756. global auth
  757. set vhand [lindex [split [lindex $text 0] |] 0]
  758. set chan [lindex $text 1]
  759. set pseudo [lindex [split $nick |] 0]
  760. if {![validuser [lindex $pseudo 0]]} {
  761. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  762. return
  763. }
  764.  
  765. if {![isauth $hand]} {
  766. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  767. return
  768. }
  769.  
  770. if {![string match #* $chan]} {
  771. puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick addmaster <pseudo> <#channel> )"
  772. return
  773. }
  774.  
  775. if ![validchan $chan] {
  776. puthelp "notice $nick :Désolé, ce salon n'est pas enregistré !"
  777. return
  778. }
  779.  
  780. if ![matchattr $hand o|n $chan] {
  781. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande (Owner sur $chan requis) !"
  782. return
  783. }
  784.  
  785. if [validuser [lindex $text 0]] {
  786. puthelp "notice $nick :Ce pseudo figure dans l'Access-List"
  787. return
  788. }
  789.  
  790. adduser $vhand [lindex $text 0]!*@*
  791. setuser $vhand HOSTS [lindex $text 0]|*!*@*
  792. chattr $vhand -h|+om [lindex $text 1]
  793. puthelp "notice $nick :[lindex $text 0] a bien été ajouté(e) en tant que Master sur [lindex $text 1] !"
  794. putserv "privmsg $::log :\00314Commande \0036Addmaster par \0031: \0034$hand"
  795. return
  796. }
  797.  
  798. # Addowner #
  799.  
  800. bind MSG - "addowner" [namespace current]::addowner
  801. proc addowner { nick uhost hand text } {
  802. global auth
  803. set vhand [lindex [split [lindex $text 0] |] 0]
  804. set chan [lindex $text 1]
  805. set pseudo [lindex [split $nick |] 0]
  806. if {![validuser [lindex $pseudo 0]]} {
  807. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  808. return
  809. }
  810.  
  811. if {![isauth $hand]} {
  812. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  813. return
  814. }
  815.  
  816. if {![string match #* $chan]} {
  817. puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick addowner <pseudo> <#channel> )"
  818. return
  819. }
  820.  
  821. if ![validchan $chan] {
  822. puthelp "notice $nick :Désolé, ce salon n'est pas enregistré !"
  823. return
  824. }
  825.  
  826. if ![matchattr $hand o| $chan] {
  827. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande (Superop sur $chan requis) !"
  828. return
  829. }
  830.  
  831. if {![validuser [lindex $text 0]]} {
  832. puthelp "notice $nick :Ce pseudo figure dans l'Access-List"
  833. return
  834. }
  835.  
  836. adduser $vhand [lindex $text 0]!*@*
  837. setuser $vhand HOSTS [lindex $text 0]|*!*@*
  838. chattr $vhand -h|+on [lindex $text 1]
  839. puthelp "notice $nick :[lindex $text 0] a bien été ajouté(e) en tant que Owner sur [lindex $text 1] !"
  840. putserv "privmsg $::log :\00314Commande \0036Addowner par \0031: \0034$hand"
  841. return
  842. }
  843.  
  844. # Addsuperop #
  845.  
  846. bind MSG - "addsuperop" [namespace current]::addsuperop
  847. proc addsuperop { nick host hand text } {
  848. global auth chan
  849. set vhand [lindex [split [lindex $text 0] |] 0]
  850. set chan [lindex $text 1]
  851. set pseudo [lindex [split $nick |] 0]
  852.  
  853. if ![validuser $pseudo] {
  854. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  855. return
  856. }
  857.  
  858. if ![isauth $hand] {
  859. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  860. return
  861. }
  862.  
  863. if ![matchattr $hand o|] {
  864. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande (SuperOp sur $::botnick requis) !"
  865. return
  866. }
  867.  
  868. adduser $vhand $vhand!*@*
  869. setuser $vhand HOSTS $vhand|*!*@*
  870. chattr $vhand +o|
  871. chattr $vhand -h|
  872. puthelp "notice $nick :$vhand a bien été ajouté(e) en tant que SuperOp sur $::botnick !"
  873. putserv "privmsg $::log :\00314Commande \0036Addsuperop par \0031: \0034$hand"
  874. }
  875.  
  876. # Delop/Delmaster/Delowner/Delsuperop #
  877.  
  878. # Delop #
  879.  
  880. bind MSG - "delop" [namespace current]::delop
  881. proc delop { nick uhost hand text } {
  882. global auth chan
  883. set vhand [lindex [split [lindex $text 0] |] 0]
  884. set chan [lindex $text 1]
  885. set pseudo [split $nick |]
  886. if {![validuser [lindex $pseudo 0]]} {
  887. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  888. return
  889. }
  890.  
  891. if {![isauth $hand]} {
  892. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  893. return
  894. }
  895.  
  896. if {![string match #* $chan]} {
  897. puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick delop <pseudo> <#channel> )"
  898. return
  899. }
  900.  
  901. if ![validchan $chan] {
  902. puthelp "notice $nick :Désolé, ce salon n'est pas enregistré !"
  903. return
  904. }
  905.  
  906. if ![matchattr $hand o|m $chan] {
  907. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande (Master sur $chan requis) !"
  908. return
  909. }
  910.  
  911. if ![matchattr $vhand |o $chan] {
  912. puthelp "notice $nick :Ce pseudo ne figure pas dans l'Access-List de $chan !"
  913. return
  914. }
  915.  
  916. if [matchattr $vhand |n $chan] {
  917. puthelp "notice $nick :Ce pseudo figure dans l'Access-List Owners sur $chan !"
  918. return
  919. }
  920.  
  921. if [matchattr $vhand |m $chan] {
  922. puthelp "notice $nick :Ce pseudo figure dans l'Access-List Masters sur $chan !"
  923. return
  924. }
  925.  
  926. delchanrec $vhand $chan
  927. puthelp "notice $nick :[lindex $text 0] a bien été supprimé(e) de l'Access-List Opérateurs sur [lindex $text 1] !"
  928. putserv "privmsg $::log :\00314Commande \0036Delop par \0031: \0034$hand"
  929.  
  930. foreach c [channels] {
  931. if [haschanrec $vhand $c] {
  932. return
  933. }}
  934. deluser $vhand
  935. }
  936.  
  937. # Delmaster #
  938.  
  939. bind MSG - "delmaster" [namespace current]::delmaster
  940. proc delmaster { nick uhost hand text } {
  941. global auth chan
  942. set vhand [lindex [split [lindex $text 0] |] 0]
  943. set chan [lindex $text 1]
  944. set pseudo [lindex [split $nick |] 0]
  945. if {![validuser [lindex $pseudo 0]]} {
  946. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  947. return
  948. }
  949.  
  950. if {![isauth $hand]} {
  951. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  952. return
  953. }
  954.  
  955. if {![string match #* $chan]} {
  956. puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick delmaster <pseudo> <#channel> )"
  957. return
  958. }
  959.  
  960. if ![validchan $chan] {
  961. puthelp "notice $nick :Désolé, ce salon n'est pas enregistré !"
  962. return
  963. }
  964.  
  965. if ![matchattr $hand o|n $chan] {
  966. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande (Owner sur $chan requis) !"
  967. return
  968. }
  969.  
  970. if ![matchattr $vhand |o $chan] {
  971. puthelp "notice $nick :Ce pseudo ne figure pas dans l'Access-List de $chan !"
  972. return
  973. }
  974.  
  975. if [matchattr $vhand |n $chan] {
  976. puthelp "notice $nick :Ce pseudo figure dans l'Access-List Owners sur $chan !"
  977. return
  978. }
  979.  
  980. if ![matchattr $vhand |m $chan] {
  981. puthelp "notice $nick :Ce pseudo figure dans l'Access-List Masters sur $chan !"
  982. return
  983. }
  984.  
  985. delchanrec $vhand $chan
  986. puthelp "notice $nick :[lindex $text 0] a bien été supprimé(e) de l'Access-List Master sur [lindex $text 1] !"
  987. putserv "privmsg $::log :\00314Commande \0036Delmaster par \0031: \0034$hand"
  988.  
  989. foreach c [channels] {
  990. if [haschanrec $vhand $c] {
  991. return
  992. }}
  993. deluser $vhand
  994. }
  995.  
  996. # Delowner #
  997.  
  998. bind MSG - "delowner" [namespace current]::delowner
  999. proc delowner { nick uhost hand text } {
  1000. global auth chan
  1001. set vhand [lindex [split [lindex $text 0] |] 0]
  1002. set chan [lindex $text 1]
  1003. set pseudo [lindex [split $nick |] 0]
  1004. if {![validuser [lindex $pseudo 0]]} {
  1005. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1006. return
  1007. }
  1008.  
  1009. if {![isauth $hand]} {
  1010. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1011. return
  1012. }
  1013.  
  1014. if {![string match #* $chan]} {
  1015. puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick delowner <pseudo> <#channel> )"
  1016. return
  1017. }
  1018.  
  1019. if ![validchan $chan] {
  1020. puthelp "notice $nick :Désolé, ce salon n'est pas enregistré !"
  1021. return
  1022. }
  1023.  
  1024. if ![matchattr $hand o| $chan] {
  1025. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande (SuperOp sur $chan requis) !"
  1026. return
  1027. }
  1028.  
  1029. if ![matchattr $vhand |o $chan] {
  1030. puthelp "notice $nick :Ce pseudo ne figure pas dans l'Access-List de $chan !"
  1031. return
  1032. }
  1033.  
  1034. if ![matchattr $vhand |n $chan] {
  1035. puthelp "notice $nick :Ce pseudo figure dans l'Access-List Owners sur $chan !"
  1036. return
  1037. }
  1038.  
  1039. if ![matchattr $vhand |m $chan] {
  1040. puthelp "notice $nick :Ce pseudo figure dans l'Access-List Master sur $chan !"
  1041. return
  1042. }
  1043.  
  1044. delchanrec $vhand $chan
  1045. puthelp "notice $nick :[lindex $text 0] a bien été supprimé(e) de l'Access-List Owner sur [lindex $text 1] !"
  1046. putserv "privmsg $::log :\00314Commande \0036Delowner par \0031: \0034$hand"
  1047.  
  1048. foreach c [channels] {
  1049. if [haschanrec $vhand $c] {
  1050. return
  1051. }}
  1052. deluser $vhand
  1053. }
  1054.  
  1055. # Delsuperop #
  1056.  
  1057. bind MSG - "delsuperop" [namespace current]::delsuperop
  1058. proc delsuperop { nick host hand text } {
  1059. global auth chan
  1060. set vhand [lindex [split [lindex $text 0] |] 0]
  1061. set chan [lindex $text 1]
  1062. set pseudo [lindex [split $nick |] 0]
  1063.  
  1064. if ![validuser $pseudo] {
  1065. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1066. return
  1067. }
  1068.  
  1069. if ![isauth $hand] {
  1070. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1071. return
  1072. }
  1073.  
  1074. if ![matchattr $hand o|] {
  1075. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande (SuperOp sur $::botnick requis) !"
  1076. return
  1077. }
  1078.  
  1079. deluser $vhand
  1080. puthelp "notice $nick :$vhand a bien été supprimé en tant que superop sur $::botnick !"
  1081. putserv "privmsg $::log :\00314Commande \0036Delsuperop par \0031: \0034$hand"
  1082. }
  1083.  
  1084. # op/deop/voice/devoice Chan #
  1085.  
  1086. # op #
  1087.  
  1088. bind pub - ".op" [namespace current]::op
  1089. proc op { nick host hand chan text } {
  1090. set pseudo [split $nick |]
  1091. if {![validuser [lindex $pseudo 0]]} {
  1092. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1093. return
  1094. }
  1095. if {![isauth $hand]} {
  1096. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1097. return
  1098. }
  1099. if {$text!=""} {
  1100. if ![matchattr $hand o|o $chan] {
  1101. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Opérateur sur $chan requis.) !"
  1102. return
  1103. }
  1104. putquick "mode $chan +oooooo [join $text]"
  1105. putserv "privmsg $::log :\00314Commande \0036Op par \0031: \0034$hand"
  1106. return
  1107. }
  1108. if [isop [join $nick] $chan] {
  1109. putserv "NOTICE $nick :Vous êtes déjà @ sur $chan !"
  1110. return
  1111. }
  1112. putquick "mode $chan +o [join $nick]"
  1113. putserv "privmsg $::log :\00314Commande \0036Op par \0031: \0034$hand"
  1114. }
  1115.  
  1116. # Deop #
  1117.  
  1118. bind PUB - ".deop" [namespace current]::deop
  1119. proc deop { nick host hand chan text } {
  1120. global auth
  1121. set pseudo [split $nick |]
  1122. set verifexempt "[split [lindex $text 0] |]"
  1123. set nickverife "[lindex $verifexempt 0]"
  1124. if {![validuser [lindex $pseudo 0]]} {
  1125. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1126. return
  1127. }
  1128. if {![isauth $hand]} {
  1129. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1130. return
  1131. }
  1132. if {$text!=""} {
  1133. if {![matchattr $hand o|o $chan]} {
  1134. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Opérateur sur $chan requis.) !"
  1135. return
  1136. }
  1137. if {[progfile exempt icr $nickverife]!="0"} {
  1138. putserv "notice $nick :Attention le Nick: \2[lindex $text 0]\2 est dans la liste des protégés."
  1139. return
  1140. }
  1141. putquick "mode $chan -oooooo [join $text]"
  1142. putserv "privmsg $::log :\00314Commande \0036Deop par \0031: \0034$hand"
  1143. return
  1144. }
  1145. if {![isop [join $nick] $chan]} {
  1146. putserv "NOTICE $nick :Vous n'êtes pas @ sur $chan !"
  1147. return
  1148. }
  1149. putquick "mode $chan -o [join $nick]"
  1150. putserv "privmsg $::log :\00314Commande \0036Deop par \0031: \0034$hand"
  1151. }
  1152.  
  1153. # Voice #
  1154.  
  1155. bind PUB - ".voice" [namespace current]::voice
  1156. proc voice { nick host hand chan text } {
  1157. global auth
  1158. set pseudo [split $nick |]
  1159. if {![validuser [lindex $pseudo 0]]} {
  1160. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1161. return
  1162. }
  1163.  
  1164. if {![isauth $hand]} {
  1165. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1166. return
  1167. }
  1168.  
  1169. if {![matchattr $hand o|o $chan]} {
  1170. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Opérateur sur $chan requis.) !"
  1171. return
  1172. }
  1173.  
  1174. if {$text!=""} {
  1175. putquick "mode $chan +vvvvvv [join $text]"
  1176. putserv "privmsg $::log :\00314Commande \0036Voice par \0031: \0034$hand"
  1177. return
  1178. }
  1179.  
  1180. if [isvoice [join $nick] $chan] {
  1181. putserv "NOTICE $nick :Vous êtes déjà voice sur $chan !"
  1182. return
  1183. }
  1184. putquick "mode $chan +v [join $nick]"
  1185. putserv "privmsg $::log :\00314Commande \0036Voice par \0031: \0034$hand"
  1186. }
  1187.  
  1188. # Devoice #
  1189.  
  1190. bind PUB - ".devoice" [namespace current]::devoice
  1191. proc devoice { nick host hand chan text } {
  1192. global auth
  1193. set pseudo [split $nick |]
  1194. set verifexempt "[split [lindex $text 0] |]"
  1195. set nickverife "[lindex $verifexempt 0]"
  1196. if {![validuser [lindex $pseudo 0]]} {
  1197. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1198. return
  1199. }
  1200.  
  1201. if {![isauth $hand]} {
  1202. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1203. return
  1204. }
  1205.  
  1206. if {![matchattr $hand o|o $chan]} {
  1207. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Opérateur sur $chan requis.) !"
  1208. return
  1209. }
  1210.  
  1211. if {[progfile exempt icr $nickverife]!="0"} {
  1212. putserv "notice $nick :Attention le Nick: \2[lindex $text 0]\2 est dans la liste des protégés."
  1213. return 0
  1214. }
  1215.  
  1216. if {$text!=""} {
  1217. putquick "mode $chan -vvvvvv [join $text]"
  1218. putserv "privmsg $::log :\00314Commande \0036Devoice par \0031: \0034$hand"
  1219. return
  1220. }
  1221.  
  1222. if {![isvoice [join $nick] $chan]} {
  1223. putserv "NOTICE $nick :Vous êtes déjà devoice sur $chan !"
  1224. return
  1225. }
  1226. putquick "mode $chan -v [join $nick]"
  1227. putserv "privmsg $::log :\00314Commande \0036Devoice par \0031: \0034$hand"
  1228. }
  1229.  
  1230. # Opall/Deopall/Voiceall/Devoiceall Chan #
  1231.  
  1232. # Opall #
  1233.  
  1234. bind pub - ".opall" [namespace current]::opall
  1235. proc opall {nick host hand chan arg} {
  1236. global auth
  1237. set arg [split $arg]
  1238. set pseudo [split $nick |]
  1239. if {![validuser [lindex $pseudo 0]]} {
  1240. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1241. return
  1242. }
  1243.  
  1244. if {![isauth $hand]} {
  1245. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1246. return
  1247. }
  1248.  
  1249. if {![matchattr $hand o|m $chan]} {
  1250. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Master sur $chan requis.) !"
  1251. return
  1252. }
  1253.  
  1254. foreach opall [chanlist $chan] { if [isop $opall $chan] continue; pushmode $chan +o $opall }
  1255. putserv "privmsg $::log :\00314Commande \0036Opall par \0031: \0034$hand"
  1256. return
  1257. }
  1258.  
  1259. # Deopall #
  1260.  
  1261. bind pub - ".deopall" [namespace current]::deopall
  1262. proc deopall { nick host hand chan arg } {
  1263. global auth
  1264. set arg [split $arg]
  1265. set pseudo [split $nick |]
  1266. if {![validuser [lindex $pseudo 0]]} {
  1267. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1268. return
  1269. }
  1270.  
  1271. if {![isauth $hand]} {
  1272. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1273. return
  1274. }
  1275.  
  1276. if {![matchattr $hand o|m $chan]} {
  1277. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Master sur $chan requis.) !"
  1278. return
  1279. }
  1280.  
  1281. foreach deopall [chanlist $chan] { if [isvoice $deopall $chan] continue; pushmode $chan -o $deopall }
  1282. putserv "privmsg $::log :\00314Commande \0036Deopall par \0031: \0034$hand"
  1283. return
  1284. }
  1285.  
  1286. # voiceall #
  1287.  
  1288. bind pub - ".voiceall" [namespace current]::voiceall
  1289. proc voiceall { nick host hand chan arg } {
  1290. global auth
  1291. set arg [split $arg]
  1292. set pseudo [split $nick |]
  1293. if {![validuser [lindex $pseudo 0]]} {
  1294. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1295. return
  1296. }
  1297.  
  1298. if {![isauth $hand]} {
  1299. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1300. return
  1301. }
  1302.  
  1303. if {![matchattr $hand o|m $chan]} {
  1304. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Master sur $chan requis.) !"
  1305. return
  1306. }
  1307.  
  1308. foreach voiceall [chanlist $chan] { if [isop $voiceall $chan] continue; pushmode $chan +v $voiceall }
  1309. putserv "privmsg $::log :\00314Commande \0036Voiceall par \0031: \0034$hand"
  1310. return
  1311. }
  1312.  
  1313. # Devoiceall #
  1314.  
  1315. bind pub - ".devoiceall" [namespace current]::devoiceall
  1316. proc devoiceall { nick host hand chan arg } {
  1317. global auth
  1318. set arg [split $arg]
  1319. set pseudo [split $nick |]
  1320. if {![validuser [lindex $pseudo 0]]} {
  1321. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1322. return
  1323. }
  1324.  
  1325. if {![isauth $hand]} {
  1326. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1327. return
  1328. }
  1329.  
  1330. if {![matchattr $hand o|m $chan]} {
  1331. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Master sur $chan requis.) !"
  1332. return
  1333. }
  1334.  
  1335. foreach devoiceall [chanlist $chan] { if [isop $devoiceall $chan] continue; pushmode $chan -v $devoiceall }
  1336. putserv "privmsg $::log :\00314Commande \0036Devoiceall par \0031: \0034$hand"
  1337. return
  1338. }
  1339.  
  1340. # op/deop/voice/devoice Msg #
  1341.  
  1342. # Op #
  1343.  
  1344. bind MSG - "op" [namespace current]::xop
  1345. proc xop { nick host hand text } {
  1346. global auth
  1347. set pseudo [split $nick |]
  1348. if {![validuser [lindex $pseudo 0]]} {
  1349. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1350. return
  1351. }
  1352.  
  1353. if {![isauth $hand]} {
  1354. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1355. return
  1356. }
  1357.  
  1358. if {![string match #* [lindex $text 0]]} {
  1359. puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $botnick op #channel (pseudo(s)) )"
  1360. return
  1361. }
  1362.  
  1363. if {![validchan [lindex $text 0]]} {
  1364. puthelp "notice $nick :Désolé le salon demandé n'est pas enregistré !"
  1365. return
  1366. }
  1367.  
  1368. if {![matchattr $hand o|o [lindex $text 0]]} {
  1369. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'utilisation de cette commande (Opérateur sur [lindex $text 0] requis) !"
  1370. return
  1371. }
  1372.  
  1373. if {![botonchan [lindex $text 0]]} {
  1374. puthelp "notice $nick :Désolé je me trouve actuellement pas sur le salon demandé !"
  1375. return
  1376. }
  1377.  
  1378. if {![botisop [lindex $text 0]]} {
  1379. puthelp "notice $nick :Désolé je ne peux te mettre op je suis deop !"
  1380. return
  1381. }
  1382.  
  1383. if {[lindex $text 1]!=""} {
  1384. putquick "mode [lindex $text 0] +oooooo [join [lrange $text 1 end]]"
  1385. putserv "privmsg $::log :\00314Commande \0036Op par \0031: \0034$hand"
  1386. return
  1387. }
  1388.  
  1389. if {![onchan $nick [lindex $text 0]]} {
  1390. puthelp "notice $nick :Vous n'êtes pas sur [lindex $text 0] !"
  1391. return
  1392. }
  1393.  
  1394. if {[isop [join $nick] [lindex $text 0]]} {
  1395. puthelp "notice $nick :Vous êtes déjà @ sur [lindex $text 0] !"
  1396. return
  1397. }
  1398. putquick "mode [lindex $text 0] +o [join $nick]"
  1399. putserv "privmsg $::log :\00314Commande \0036Op par \0031: \0034$hand"
  1400. }
  1401.  
  1402. # Deop #
  1403.  
  1404. bind MSG - "deop" [namespace current]::xdeop
  1405. proc xdeop { nick host hand text } {
  1406. global auth
  1407. set pseudo [split $nick |]
  1408. set verifexempt "[split [lindex $text 1] |]"
  1409. set nickverife "[lindex $verifexempt 0]"
  1410. if {![validuser [lindex $pseudo 0]]} {
  1411. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1412. return
  1413. }
  1414.  
  1415. if {![isauth $hand]} {
  1416. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1417. return
  1418. }
  1419.  
  1420. if {![string match #* [lindex $text 0]]} {
  1421. puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick deop #channel (pseudo(s)) )"
  1422. return
  1423. }
  1424.  
  1425. if {![validchan [lindex $text 0]]} {
  1426. puthelp "notice $nick :Désolé je me trouve actuellement pas sur le salon demandé !"
  1427. return
  1428. }
  1429.  
  1430. if {![matchattr $hand o|o [lindex $text 0]]} {
  1431. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'utilisation de cette commande (Opérateur sur [lindex $text 0] requis) !"
  1432. return
  1433. }
  1434.  
  1435. if {![onchan $nick [lindex $text 0]]} {
  1436. puthelp "notice $nick :Vous n'êtes pas sur [lindex $text 0] !"
  1437. return
  1438. }
  1439.  
  1440. if {![botonchan [lindex $text 0]]} {
  1441. puthelp "notice $nick :Désolé je me trouve actuellement pas sur le salon demandé !"
  1442. return
  1443. }
  1444.  
  1445. if {![botisop [lindex $text 0]]} {
  1446. puthelp "notice $nick :Désolé je ne peux te mettre deop je suis deop !"
  1447. return
  1448. }
  1449.  
  1450. if {[progfile exempt icr $nickverife]!="0"} {
  1451. putserv "notice $nick :Attention le Nick: \2$nickverife\2 est dans la liste des protégés."
  1452. return 0
  1453. }
  1454.  
  1455. if {[lindex $text 1] !=""} {
  1456. putquick "mode [lindex $text 0] -oooooo [join [lrange $text 1 end]]"
  1457. putserv "privmsg $::log :\00314Commande \0036Deop par \0031: \0034$hand"
  1458. return
  1459. }
  1460.  
  1461. if ![isop [join $nick] [lindex $text 0]] {
  1462. puthelp "notice $nick :Vous êtes déjà deop sur [lindex $text 0] !"
  1463. return
  1464. }
  1465. putquick "mode [lindex $text 0] -o [join $nick]"
  1466. putserv "privmsg $::log :\00314Commande \0036Deop par \0031: \0034$hand"
  1467. }
  1468.  
  1469. # Voice #
  1470.  
  1471. bind MSG - "voice" [namespace current]::xvoice
  1472. proc xvoice { nick uhost hand text } {
  1473. global auth
  1474. set pseudo [split $nick |]
  1475. if {![validuser [lindex $pseudo 0]]} {
  1476. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1477. return
  1478. }
  1479.  
  1480. if {![isauth $hand]} {
  1481. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1482. return
  1483. }
  1484.  
  1485. if {![string match #* [lindex $text 0]]} {
  1486. puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $botnick voice #channel (pseudo(s)) )"
  1487. return
  1488. }
  1489.  
  1490. if {![validchan [lindex $text 0]]} {
  1491. puthelp "notice $nick :Désolé je me trouve actuellement pas sur le salon demandé !"
  1492. return
  1493. }
  1494.  
  1495. if {![matchattr $hand o|o [lindex $text 0]]} {
  1496. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'utilisation de cette commande (Opérateur sur [lindex $text 0] requis) !"
  1497. return
  1498. }
  1499.  
  1500. if {![onchan $nick [lindex $text 0]]} {
  1501. puthelp "notice $nick :Vous n'êtes pas sur [lindex $text 0] !"
  1502. return
  1503. }
  1504.  
  1505. if {![botonchan [lindex $text 0]]} {
  1506. puthelp "notice $nick :Désolé je me trouve actuellement pas sur le salon demandé !"
  1507. return
  1508. }
  1509.  
  1510. if {![botisop [lindex $text 0]]} {
  1511. puthelp "notice $nick :Désolé je ne peux te mettre voice je suis deop !"
  1512. return
  1513. }
  1514.  
  1515. if {[lindex $text 1] !=""} {
  1516. putquick "mode [lindex $text 0] +vvvvvv [join [lrange $text 1 end]]"
  1517. putserv "privmsg $::log :\00314Commande \0036Voice par \0031: \0034$hand"
  1518. return
  1519. }
  1520.  
  1521. if {![isop [join $nick] [lindex $text 0]]} {
  1522. puthelp "notice $nick :Vous êtes déjà voice sur [lindex $text 0] !"
  1523. return
  1524. }
  1525. putquick "mode [lindex $text 0] +v [join $nick]"
  1526. putserv "privmsg $::log :\00314Commande \0036Voice par \0031: \0034$hand"
  1527. }
  1528.  
  1529. # Devoice #
  1530.  
  1531. bind MSG - "devoice" [namespace current]::xdevoice
  1532. proc xdevoice { nick host hand text } {
  1533. global auth
  1534. set pseudo [split $nick |]
  1535. set verifexempt "[split [lindex $text 1] |]"
  1536. set nickverife "[lindex $verifexempt 0]"
  1537. if {![validuser [lindex $pseudo 0]]} {
  1538. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1539. return
  1540. }
  1541.  
  1542. if {![isauth $hand]} {
  1543. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1544. return
  1545. }
  1546.  
  1547. if {![string match #* [lindex $text 0]]} {
  1548. puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $botnick devoice #channel (pseudo(s)) )"
  1549. return
  1550. }
  1551.  
  1552. if {![validchan [lindex $text 0]]} {
  1553. puthelp "notice $nick :Désolé je me trouve actuellement pas sur le salon demandé !"
  1554. return
  1555. }
  1556.  
  1557. if {![matchattr $hand o|o [lindex $text 0]]} {
  1558. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'utilisation de cette commande (Opérateur sur [lindex $text 0] requis) !"
  1559. return
  1560. }
  1561. if {![onchan $nick [lindex $text 0]]} {
  1562. puthelp "notice $nick :Vous n'êtes pas sur [lindex $text 0] !"
  1563. return
  1564. }
  1565.  
  1566. if {![botonchan [lindex $text 0]]} {
  1567. puthelp "notice $nick :Désolé je me trouve actuellement pas sur le salon demandé !"
  1568. return
  1569. }
  1570.  
  1571. if {![botisop [lindex $text 0]]} {
  1572. puthelp "notice $nick :Désolé je ne peux te mettre devoice je suis deop !"
  1573. return
  1574. }
  1575. if {[progfile exempt icr $nickverife]!="0"} {
  1576. putserv "notice $nick :Attention le Nick: \2$nickverife\2 est dans la liste des protégés."
  1577. return 0
  1578. }
  1579.  
  1580. if {[lindex $text 1] !=""} {
  1581. putquick "mode [lindex $text 0] -vvvvvv [join [lrange $text 1 end]]"
  1582. putserv "privmsg $::log :\00314Commande \0036Devoice par \0031: \0034$hand"
  1583. return
  1584. }
  1585.  
  1586. if ![isop [join $nick] [lindex $text 0]] {
  1587. puthelp "notice $nick :Vous êtes déjà devoice sur [lindex $text 0] !"
  1588. return
  1589. }
  1590. putquick "mode [lindex $text 0] -v [join $nick]"
  1591. putserv "privmsg $::log :\00314Commande \0036Devoice par \0031: \0034$hand"
  1592. }
  1593.  
  1594. # Ban/Kick/Unban/Kickban Chan #
  1595.  
  1596. # Ban #
  1597.  
  1598. bind pub - ".ban" [namespace current]::ban
  1599. proc ban { nick host hand chan text } {
  1600. global auth
  1601. set pseudo [split $nick |]
  1602. set verifexempt "[split [lindex $text 0] |]"
  1603. set nickverife "[lindex $verifexempt 0]"
  1604. if {![validuser [lindex $pseudo 0]]} {
  1605. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1606. return
  1607. }
  1608.  
  1609. if {![isauth $hand]} {
  1610. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1611. return
  1612. }
  1613.  
  1614. if {![matchattr $hand o|o $chan]} {
  1615. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Opérateur sur $chan requis.) !"
  1616. return
  1617. }
  1618.  
  1619. if {$text == ""} {
  1620. puthelp "notice $nick :Syntaxe incorrecte ! ( .ban pseudo/host )"
  1621. return
  1622. }
  1623.  
  1624. if {[progfile exempt icr $nickverife]!="0"} {
  1625. putserv "notice $nick :Attention le Nick: \2[lindex $text 0]\2 est dans la liste des protégés."
  1626. return
  1627. }
  1628.  
  1629. if {[string match *!*@* [lindex $text 0]]} {
  1630. putquick "mode $chan +b [lindex $text 0]"
  1631. putserv "privmsg $::log :\00314Commande \0036Ban par \0031: \0034$hand"
  1632. return
  1633. }
  1634.  
  1635. if {[llength [getchanhost [lindex $text 0]]]!=0} {
  1636. set host [lindex [split [getchanhost [lindex $text 0]] @] 1]
  1637. putquick "mode $chan +b *!*@$host"
  1638. putserv "privmsg $::log :\00314Commande \0036Ban par \0031: \0034$hand"
  1639. return
  1640. }
  1641. puthelp "notice $nick :Le pseudo [lindex $text 0] n'est pas sur un de mes salons, je ne peux récupérer son host !"
  1642. }
  1643.  
  1644. # Kick #
  1645.  
  1646. bind pub - ".kick" [namespace current]::kick
  1647. proc kick { nick uhost hand chan text } {
  1648. global auth
  1649. set pseudo [split $nick |]
  1650. set verifexempt "[split [lindex $text 0] |]"
  1651. set nickverife "[lindex $verifexempt 0]"
  1652. if {![validuser [lindex $pseudo 0]]} {
  1653. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1654. return
  1655. }
  1656.  
  1657. if {![isauth $hand]} {
  1658. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1659. return
  1660. }
  1661.  
  1662. if {![matchattr $hand o|o $chan]} {
  1663. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Opérateur sur $chan requis.) !"
  1664. return
  1665. }
  1666.  
  1667. if {$text == ""} {
  1668. puthelp "notice $nick :Syntaxe : .kick <pseudo> <raison>"
  1669. return
  1670. }
  1671.  
  1672. if {$text != ""} {
  1673. if {![onchan [lindex $text 0]]} {
  1674. puthelp "notice $nick :Le pseudo [lindex $text 0] n'est pas sur $chan"
  1675. return
  1676. }
  1677. if {[progfile exempt icr $nickverife]!="0"} {
  1678. putserv "notice $nick :Attention le Nick: \2[lindex $text 0]\2 est dans la liste des protégés."
  1679. return 0
  1680. }
  1681. if {[lindex $text 1] != ""} {
  1682. putquick "kick $chan [lindex $text 0] :[join [lrange $text 1 end]]"
  1683. putserv "privmsg $::log :\00314Commande \0036Kick par \0031: \0034$hand"
  1684. return
  1685. }
  1686.  
  1687. if {[lindex $text 1] == ""} {
  1688. putquick "kick $chan [lindex $text 0] :$::kick $nick !"
  1689. putserv "privmsg $::log :\00314Commande \0036Kick par \0031: \0034$hand"
  1690. return
  1691. }}}
  1692.  
  1693. # Unban #
  1694.  
  1695. bind pub - ".unban" [namespace current]::unban
  1696. proc unban { nick uhost hand chan text } {
  1697. global auth
  1698. set pseudo [split $nick |]
  1699. if {![validuser [lindex $pseudo 0]]} {
  1700. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1701. return
  1702. }
  1703.  
  1704. if {![isauth $hand]} {
  1705. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1706. return
  1707. }
  1708.  
  1709. if {![matchattr $hand o|o $chan]} {
  1710. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Opérateur sur $chan requis.) !"
  1711. return
  1712. }
  1713.  
  1714. if {$text == ""} {
  1715. puthelp "notice $nick :Syntaxe : .unban <host>"
  1716. return
  1717. }
  1718.  
  1719. if {[string match *!*@* [lindex $text 0]]} {
  1720. putquick "mode $chan -b [lindex $text 0]"
  1721. putserv "privmsg $::log :\00314Commande \0036Unban par \0031: \0034$hand"
  1722. return
  1723. }
  1724.  
  1725. if {[llength [getchanhost [lindex $text 0]]]!=0} {
  1726. set host [lindex [split [getchanhost [lindex $text 0]] @] 1]
  1727. putquick "mode $chan -b *!*@$host"
  1728. putserv "privmsg $::log :\00314Commande \0036Unban par \0031: \0034$hand"
  1729. return
  1730. }}
  1731.  
  1732. # Kickban #
  1733.  
  1734. bind pub - ".kickban" [namespace current]::kickban
  1735. proc kickban { nick uhost hand chan text } {
  1736. global auth
  1737. set pseudo [split $nick |]
  1738. set verifexempt "[split [lindex $text 0] |]"
  1739. set nickverife "[lindex $verifexempt 0]"
  1740. if {![validuser [lindex $pseudo 0]]} {
  1741. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1742. return
  1743. }
  1744.  
  1745. if {![isauth $hand]} {
  1746. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1747. return
  1748. }
  1749.  
  1750. if {![matchattr $hand o|o $chan]} {
  1751. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Opérateur sur $chan requis.) !"
  1752. return
  1753. }
  1754.  
  1755. if {$text == ""} {
  1756. puthelp "notice $nick :Syntaxe : .kickban <pseudo>"
  1757. return
  1758. }
  1759.  
  1760. if {![onchan [lindex $text 0] $chan]} {
  1761. puthelp "notice $nick :Le pseudo [lindex $text 0] n'est pas sur $chan"
  1762. return
  1763. }
  1764.  
  1765. if {![botisop [lindex $chan]]} {
  1766. puthelp "notice $nick :Désolé je ne peux kickban je suis deop !"
  1767. return
  1768. }
  1769.  
  1770. if {[progfile exempt icr $nickverife]!="0"} {
  1771. putserv "notice $nick :Attention le Nick: \2[lindex $text 0]\2 est dans la liste des protégés."
  1772. return 0
  1773. }
  1774. set host [lindex [split [getchanhost [lindex $text 0]] @] 1]
  1775. putquick "mode $chan +b *!*@$host"
  1776. putquick "kick $chan [lindex $text 0] :[join [lrange $text 1 end]] (Exclu(e) de $chan"
  1777. putserv "privmsg $::log :\00314Commande \0036Kickban par \0031: \0034$hand"
  1778. return
  1779. }
  1780.  
  1781. # Ban/Kick/Unban/Kickban MSG #
  1782.  
  1783. # Ban #
  1784.  
  1785. bind msg - "ban" [namespace current]::xban
  1786. proc xban { nick uhost hand arg } {
  1787. global auth
  1788. set pseudo [lindex [split $nick |] 0]
  1789. set chan [lindex $arg 0]
  1790. set cible [lindex $arg 1]
  1791. set verifexempt "[split [lindex $arg 1] |]"
  1792. set nickverife "[lindex $verifexempt 0]"
  1793. if {![validuser $pseudo]} {
  1794. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1795. return
  1796. }
  1797.  
  1798. if {![isauth $hand]} {
  1799. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1800. return
  1801. }
  1802.  
  1803. if ("[llength $arg]"!="2")||![string match -nocase #* $chan] {
  1804. puthelp "notice $nick :Syntaxe incorrect ( /msg $::botnick ban <#salon> <pseudo/host> )"
  1805. return
  1806. }
  1807.  
  1808. if {![validchan [lindex $arg 0]]} {
  1809. puthelp "notice $nick :Désolé le salon n'est pas un salon enregistré !"
  1810. return
  1811. }
  1812.  
  1813. if {![matchattr $hand o|o $chan]} {
  1814. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Opérateur sur $chan requis.) !"
  1815. return
  1816. }
  1817.  
  1818. if {![botonchan [lindex $arg 0]]} {
  1819. puthelp "notice $nick :Désolé je me trouve actuellement pas sur le salon demandé !"
  1820. return
  1821. }
  1822.  
  1823. if {![botisop [lindex $arg 0]]} {
  1824. puthelp "notice $nick :Désolé je ne suis pas op sur $chan !"
  1825. return
  1826. }
  1827.  
  1828. if {[string match *!*@* $cible]} {
  1829. putquick "mode $chan +b $cible"
  1830. putserv "privmsg $::log :\00314Commande \0036Ban par \0031: \0034$hand"
  1831. return
  1832. }
  1833.  
  1834. if {[progfile exempt icr $nickverife]!="0"} {
  1835. putserv "notice $nick :Attention le Nick: \2$cible\2 est dans la liste des protégés."
  1836. return 0
  1837. }
  1838.  
  1839. if {[llength [getchanhost $cible]]!=0} {
  1840. set host [lindex [split [getchanhost $cible] @] 1]
  1841. putquick "mode $chan +b *!*@$host"
  1842. putserv "privmsg $::log :\00314Commande \0036Ban par \0031: \0034$hand"
  1843. return
  1844. }
  1845. puthelp "notice $nick :Le pseudo $cible n'est pas sur un de mes salons, je ne peux récupérer son host !"
  1846. }
  1847.  
  1848. # kick #
  1849.  
  1850. bind msg - "kick" [namespace current]::xkick
  1851. proc xkick { nick uhost hand text } {
  1852. global auth
  1853. set chan [lindex $text 0]
  1854. set cible [lindex $text 1]
  1855. set pseudo [lindex [split $nick |] 0]
  1856. set verifexempt "[split [lindex $text 1] |]"
  1857. set nickverife "[lindex $verifexempt 0]"
  1858. if {![validuser $pseudo]} {
  1859. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1860. return
  1861. }
  1862.  
  1863. if {![isauth $hand]} {
  1864. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1865. return
  1866. }
  1867.  
  1868. if {![string match #* [lindex $text 0]]} {
  1869. puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $botnick kick <#salon> (pseudo(s)) )"
  1870. return
  1871. }
  1872.  
  1873. if {![validchan [lindex $text 0]]} {
  1874. puthelp "notice $nick :Désolé le salon n'est pas un salon enregistré !"
  1875. return
  1876. }
  1877.  
  1878. if {![matchattr $hand o|o $chan]} {
  1879. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Opérateur sur $chan requis.) !"
  1880. return
  1881. }
  1882.  
  1883. if {![onchan $nick [lindex $text 0]]} {
  1884. puthelp "notice $nick :Vous n'êtes pas sur [lindex $text 0] !"
  1885. return
  1886. }
  1887.  
  1888. if {![botonchan [lindex $text 0]]} {
  1889. puthelp "notice $nick :Désolé je me trouve actuellement pas sur le salon demandé !"
  1890. return
  1891. }
  1892.  
  1893. if {![botisop [lindex $text 0]]} {
  1894. puthelp "notice $nick :Désolé je ne suis pas op sur $chan !"
  1895. return
  1896. }
  1897.  
  1898. if {![onchan $cible $chan]} {
  1899. puthelp "notice $nick :Le pseudo [lindex $text 1] n'est pas sur [lindex $text 0] !"
  1900. return
  1901. }
  1902.  
  1903. if {[progfile exempt icr $nickverife]!="0"} {
  1904. puthelp "notice $nick :Attention le Nick: \2[lindex $text 1]\2 est dans la liste des protégés."
  1905. return 0
  1906. }
  1907.  
  1908. if {[lindex $text 2] !=""} {
  1909. putquick "kick [lindex $text 0] [lindex $text 1] :[join [lrange $text 2 end]]"
  1910. putserv "privmsg $::log :\00314Commande \0036Kick par \0031: \0034$hand"
  1911. return
  1912. }
  1913.  
  1914. if {[onchan [join [lindex $text 1]] [lindex $text 0]]} {
  1915. putquick "kick [lindex $text 0] [lindex $text 1] :$::kick $nick !"
  1916. putserv "privmsg $::log :\00314Commande \0036Kick par \0031: \0034$hand"
  1917. return
  1918. }}
  1919.  
  1920. # Unban #
  1921.  
  1922. bind msg - "unban" [namespace current]::xunban
  1923. proc xunban { nick uhost hand arg } {
  1924. global auth
  1925. set chan [lindex $arg 0]
  1926. set pseudo [split $nick |]
  1927. if {![validuser [lindex $pseudo 0]]} {
  1928. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1929. return
  1930. }
  1931.  
  1932. if {![isauth $hand]} {
  1933. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1934. return
  1935. }
  1936.  
  1937. if {![matchattr $hand o|o $chan]} {
  1938. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Opérateur sur $chan requis.) !"
  1939. return
  1940. }
  1941.  
  1942. if {![string match #* [lindex $arg 0]]} {
  1943. puthelp "notice $nick :Syntaxe : /msg $::botnick unban <#salon> <host>"
  1944. return
  1945. }
  1946.  
  1947. if {[string match *!*@* [lindex $arg 1]]} {
  1948. putquick "mode $chan -b [lindex $arg 1]"
  1949. putserv "privmsg $::log :\00314Commande \0036Unban par \0031: \0034$hand"
  1950. return
  1951. }
  1952.  
  1953. if {[llength [getchanhost [lindex $arg 0]]]!=0} {
  1954. set host [lindex [split [getchanhost [lindex $arg 0]] @] 1]
  1955. putquick "mode $chan -b *!*@$host"
  1956. putserv "privmsg $::log :\00314Commande \0036Unban par \0031: \0034$hand"
  1957. return
  1958. }}
  1959.  
  1960. # Kickban #
  1961.  
  1962. bind msg - "kickban" [namespace current]::xkickban
  1963. proc xkickban { nick uhost hand arg } {
  1964. global auth
  1965. set chan [lindex $arg 0]
  1966. set pseudo [split $nick |]
  1967. set verifexempt "[split [lindex $arg 1] |]"
  1968. set nickverife "[lindex $verifexempt 0]"
  1969. if {![validuser [lindex $pseudo 0]]} {
  1970. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  1971. return
  1972. }
  1973.  
  1974. if {![isauth $hand]} {
  1975. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  1976. return
  1977. }
  1978.  
  1979. if {![matchattr $hand o|o $chan]} {
  1980. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Opérateur sur $chan requis.) !"
  1981. return
  1982. }
  1983.  
  1984. if {![string match #* [lindex $arg 0]]} {
  1985. puthelp "notice $nick :Syntaxe : /msg $::botnick kickban <#salon> <pseudo> <raison>"
  1986. return
  1987. }
  1988.  
  1989. if {[progfile exempt icr $nickverife]!="0"} {
  1990. puthelp "notice $nick :Attention le Nick: \2[lindex $arg 1]\2 est dans la liste des protégés."
  1991. return 0
  1992. }
  1993.  
  1994. if {[llength [getchanhost [lindex $arg 1]]]!=0} {
  1995. set host [lindex [split [getchanhost [lindex $arg 1]] @] 1]
  1996. putquick "mode $chan +b *!*@$host"
  1997. putquick "kick [lindex $arg 0] [lindex $arg 1] :[join [lrange $arg 2 end]] (Exclu(e) de $chan"
  1998. putserv "privmsg $::log :\00314Commande \0036Kickban par \0031: \0034$hand"
  1999. return
  2000. }}
  2001.  
  2002. # Clearban/Mode Chan #
  2003.  
  2004. # Clearban #
  2005.  
  2006. bind pub - ".clearbans" [namespace current]::clearbans
  2007. proc clearbans { nick host hand chan text } {
  2008. global auth
  2009. set pseudo [split $nick |]
  2010. if {![validuser [lindex $pseudo 0]]} {
  2011. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  2012. return
  2013. }
  2014.  
  2015. if {![isauth $hand]} {
  2016. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  2017. return
  2018. }
  2019.  
  2020. if {![matchattr $hand o|m $chan]} {
  2021. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Master sur [lindex $text 0] requis.) !"
  2022. return
  2023. }
  2024.  
  2025. foreach bsyntaxe [chanbans $chan] {
  2026. putquick "mode $chan -b [lindex $bsyntaxe 0]"
  2027. }
  2028. putserv "privmsg $::log :\00314Commande \0036Clearbans par \0031: \0034$hand"
  2029. }
  2030.  
  2031. # Mode #
  2032.  
  2033. bind pub - ".mode" [namespace current]::mode
  2034. proc mode { nick uhost hand chan text } {
  2035. global auth
  2036. set pseudo [split $nick |]
  2037. if {![validuser [lindex $pseudo 0]]} {
  2038. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  2039. return
  2040. }
  2041.  
  2042. if {![isauth $hand]} {
  2043. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  2044. return
  2045. }
  2046.  
  2047. if {$text!=""} {
  2048. if {![matchattr $hand o|m $chan]} {
  2049. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Master sur $chan requis.) !"
  2050. return
  2051. }
  2052. putquick "mode $chan $text"
  2053. putserv "privmsg $::log :\00314Commande \0036Mode par \0031: \0034$hand"
  2054. }}
  2055.  
  2056. # Clearbans/Mode Msg #
  2057.  
  2058. # Clearbans #
  2059.  
  2060. bind msg - "clearbans" [namespace current]::xclearbans
  2061. proc xclearbans { nick host hand text } {
  2062. global auth
  2063. set chan [lindex $text 0]
  2064. set pseudo [split $nick |]
  2065. if {![validuser [lindex $pseudo 0]]} {
  2066. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  2067. return
  2068. }
  2069.  
  2070. if {![isauth $hand]} {
  2071. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  2072. return
  2073. }
  2074.  
  2075. if {![string match #* [lindex $text 0]]} {
  2076. puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $botnick clearbans <#salon>)"
  2077. return
  2078. }
  2079.  
  2080. if {![validchan [lindex $text 0]]} {
  2081. puthelp "notice $nick :Désolé je me trouve actuellement pas sur le salon demandé !"
  2082. return
  2083. }
  2084.  
  2085. if {![matchattr $hand o|m [lindex $text 0]]} {
  2086. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'utilisation de cette commande (Master sur [lindex $text 0] requis) !"
  2087. return
  2088. }
  2089.  
  2090. if {![botonchan [lindex $text 0]]} {
  2091. puthelp "notice $nick :Désolé je me trouve actuellement pas sur le salon demandé !"
  2092. return
  2093. }
  2094.  
  2095. if {![botisop [lindex $text 0]]} {
  2096. puthelp "notice $nick :Désolé je ne peux clearbans je suis deop !"
  2097. return
  2098. }
  2099.  
  2100. foreach bsyntaxe [chanbans $chan] {
  2101. putquick "mode $chan -b [lindex $bsyntaxe 0]"
  2102. }
  2103. putserv "privmsg $::log :\00314Commande \0036Clearbans par \0031: \0034$hand"
  2104. }
  2105.  
  2106. # Mode #
  2107.  
  2108. bind msg - "mode" [namespace current]::xmode
  2109. proc xmode { nick host hand text } {
  2110. global auth
  2111. set chan [lindex $text 0]
  2112. set pseudo [split $nick |]
  2113. if {![validuser [lindex $pseudo 0]]} {
  2114. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  2115. return
  2116. }
  2117.  
  2118. if {![isauth $hand]} {
  2119. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  2120. return
  2121. }
  2122.  
  2123. if {![string match #* [lindex $text 0]]} {
  2124. puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $botnick mode <#salon> <mode(s)>)"
  2125. return
  2126. }
  2127.  
  2128. if {![validchan [lindex $text 0]]} {
  2129. puthelp "notice $nick :Désolé je me trouve actuellement pas sur le salon demandé !"
  2130. return
  2131. }
  2132.  
  2133. if {$text!=""} {
  2134. if {![matchattr $hand o|m [lindex $text 0]]} {
  2135. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'utilisation de cette commande (Master sur [lindex $text 0] requis) !"
  2136. return
  2137. }
  2138.  
  2139. if {![botonchan [lindex $text 0]]} {
  2140. puthelp "notice $nick :Désolé je me trouve actuellement pas sur le salon demandé !"
  2141. return
  2142. }
  2143.  
  2144. if {![botisop [lindex $text 0]]} {
  2145. puthelp "notice $nick :Désolé je ne peux Mode je suis deop !"
  2146. return
  2147. }
  2148. putquick "mode $chan [lindex $text 1]"
  2149. putserv "privmsg $::log :\00314Commande \0036Mode par \0031: \0034$hand"
  2150. }}
  2151.  
  2152. # Topic #
  2153.  
  2154. bind pub - ".topic" [namespace current]::topic
  2155. proc topic { nick host hand chan arg} {
  2156. global auth
  2157. set pseudo [split $nick |]
  2158. if {![validuser [lindex $pseudo 0]]} {
  2159. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  2160. return
  2161. }
  2162.  
  2163. if {![isauth $hand]} {
  2164. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  2165. return
  2166. }
  2167.  
  2168. if {![matchattr $hand o|m $chan]} {
  2169. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'exécution de cette commande ( Master sur $chan requis.) !"
  2170. return
  2171. }
  2172. putquick "TOPIC $chan :$arg"
  2173. putserv "privmsg $::log :\00314Commande \0036Topic par \0031: \0034$hand"
  2174. }
  2175.  
  2176. # Infoline #
  2177.  
  2178. bind msg - "infoline" [namespace current]::infoline
  2179. proc infoline { nick host hand arg } {
  2180. set chan [lindex $arg 0]
  2181. set pseudo [split $nick |]
  2182. if {![validuser [lindex $pseudo 0]]} {
  2183. puthelp "notice $nick :Vous n'avez aucun access dans $::botnick !"
  2184. return
  2185. }
  2186. if {![isauth $hand]} {
  2187. puthelp "notice $nick :Veuillez vous identifier au préalable ! ( /msg $::botnick auth <pseudo> <pass> )"
  2188. return
  2189. }
  2190. if {![string match #* [lindex $arg 0]]} {
  2191. puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick infoline <#salon> <text>)"
  2192. return
  2193. }
  2194. if {![validchan [lindex $arg 0]]} {
  2195. puthelp "notice $nick :Désolé je me trouve actuellement pas sur le salon demandé !"
  2196. return
  2197. }
  2198. if { [string length $arg] ne 0 } {
  2199. if {![matchattr $hand |o [lindex $arg 0]]} {
  2200. puthelp "notice $nick :Vous n'avez pas les droits nécessaires à l'utilisation de cette commande (Opérateur sur [lindex $arg 0] requis) !"
  2201. return
  2202. } else {
  2203. setchaninfo $hand $chan $arg
  2204. puthelp "notice $nick :Infoline définie :$arg"
  2205. putserv "privmsg $::log :\00314Commande \0036Infoline par \0031: \0034$hand"
  2206. }
  2207. }
  2208. }
  2209. bind notc - * nonotice_chanoff
  2210. proc nonotice_chanoff { nick uhost hand text dest } {
  2211. global botnick
  2212. if ("$nick"=="")||("$dest"=="$botnick") {return 0}
  2213. if [validuser [finduser $nick!*@*]]&&[matchattr $hand o|o $dest] {return 0}
  2214. if [isop $nick $dest]||[isvoice $nick $dest] {return 0}
  2215. if ![botisop $dest] {return 0}
  2216. if [string match -nocase niubot?? $nick] {return 0}
  2217. set host [lindex [split $uhost @] 1]
  2218. putquick "mode $dest +b *!*@$host"
  2219. putquick "kick $dest $nick :$::nt"
  2220. }
  2221.  
  2222. # Help #
  2223.  
  2224. bind msg - "help" [namespace current]::help
  2225. proc help { nick host hand arg } {
  2226. set commande [lindex $arg 1]
  2227. set commande [stripcodes abcu [lindex $arg 0]]
  2228. if {$commande == ""} {
  2229. puthelp "privmsg $nick :\00314Commande Help du Robot \002\0034$::botnick\002\0034"
  2230. puthelp "privmsg $nick :"
  2231. foreach c [channels] {
  2232. if [matchattr $hand |o $c] {
  2233. puthelp "privmsg $nick :\0031\037Level \002Opérateur\002 :\0037"
  2234. puthelp "privmsg $nick :"
  2235. puthelp "privmsg $nick :\00314Auth \0031: \0034Permet de vous identifer auprès du Robot $::botnick en MSG !"
  2236. puthelp "privmsg $nick :\00314Op \0031: \0034Permet de te mettre Opérateur \0031(\00312@\0031) \0034 ou de deop sur le salon ou en Msg. et pour le faire sur quelqun aussi !"
  2237. puthelp "privmsg $nick :\00314Deop \0031: \0034Permet de te mettre Deop \0031(\00312-@\0031) \0034 sur le salon ou en Msg. et pour le faire sur quelqun aussi !"
  2238. puthelp "privmsg $nick :\00314Voice \0031: \0034Permet de te mettre voice \0031(\0033+v\0031) \0034 sur le salon ou en Msg. et pour le faire sur quelqun aussi !"
  2239. puthelp "privmsg $nick :\00314Devoice \0031: \0034Permet de te mettre Devoice \0031(\0033-v\0031) \0034 sur le salon ou en Msg. et pour le faire sur quelqun aussi !"
  2240. puthelp "privmsg $nick :\00314Kick \0031: \0034Permet de Kick quelqun sur un salon défini commande Chan ou Msg !"
  2241. puthelp "privmsg $nick :\00314Kickban \0031: \0034Permet de Kickban quelqun sur un salon défini commande Chan ou Msg !"
  2242. puthelp "privmsg $nick :\00314Ban \0031: \0034Permet de Ban quelqun sur un salon défini commande Chan ou Msg !"
  2243. puthelp "privmsg $nick :\00314Unban \0031: \0034Permet de Unban quelqun sur un salon défini commande Chan ou Msg !"
  2244. puthelp "privmsg $nick :\00314Access \0031: \0034Permet de regarder la liste d'acces command Msg !"
  2245. puthelp "privmsg $nick :\00314Deauth \0031: \0034Permet de vous déauthentifer auprès du Robot $::botnick commande Msg !"
  2246. puthelp "privmsg $nick :\00314Newpass \0031: \0034Permet de changer votre mot de pass auprès du Robot $::botnick commande Msg !"
  2247. puthelp "privmsg $nick :\00314Infoline \0031: \0034Permet de vous mettre un text a l'entrée d'un salon commande Msg !"
  2248. puthelp "privmsg $nick :"
  2249. break
  2250. }}
  2251.  
  2252. foreach c [channels] {
  2253. if [matchattr $hand |m $c] {
  2254. puthelp "privmsg $nick :\0031\037Level \002Master\002 :\037"
  2255. puthelp "privmsg $nick :"
  2256. puthelp "privmsg $nick :\00314Addop \0031: \0034Permet de mettre un user Opérateur sur un salon défini commande Chan ou Msg !"
  2257. puthelp "privmsg $nick :\00314Delop \0031: \0034Permet de retiré le level Opérateur sur un salon défini commande Chan ou Msg !"
  2258. puthelp "privmsg $nick :\00314Clearbans \0031: \0034Permet de Clearbans tout les ban sur le salon commande Chan ou Msg !"
  2259. puthelp "privmsg $nick :\00314Mode \0031: \0034Permet de mettre ou retirer un Mode commande Chan ou Msg !"
  2260. puthelp "privmsg $nick :\00314Opall \0031: \0034Permet de mettre tout le mondes Op commande Chan !"
  2261. puthelp "privmsg $nick :\00314Deopall \0031: \0034Permet de mettre tout le mondes Deop commande Chan !"
  2262. puthelp "privmsg $nick :\00314Voiceall \0031: \0034Permet de mettre tout le mondes Voice commande Chan !"
  2263. puthelp "privmsg $nick :\00314Devoiceall \0031: \0034Permet de mettre tout le mondes Devoice commande Chan !"
  2264. puthelp "privmsg $nick :"
  2265. break
  2266. }}
  2267.  
  2268. foreach c [channels] {
  2269. if [matchattr $hand |n $c] {
  2270. puthelp "privmsg $nick :\0031\037Level \002Owner\002 :\037"
  2271. puthelp "privmsg $nick :\00314Addmaster \0031: \0034Permet de mettre un user ou un Opérateur d'un salon le level Master commande Msg !"
  2272. puthelp "privmsg $nick :\00314Delmaster \0031: \0034Permet de retiré le level Master sur un salon défini commande Msg !"
  2273.  
  2274. break
  2275. }}
  2276.  
  2277. foreach c [channels] {
  2278. if [matchattr $hand o| $c] {
  2279. puthelp "privmsg $nick :\0031\037Level \002SuperOp\002 :\037"
  2280. puthelp "privmsg $nick :\00314Delowner \0031: \0034Permet de retiré le level Owner sur un salon défini commande Msg !"
  2281. puthelp "privmsg $nick :\00314Exempt \0031: \0034Permet de mettre/retirer/regarder les pseudos protégés commande Chan !"
  2282. puthelp "privmsg $nick :\00314Blacklist \0031: \0034Permet de mettre/retirer/regarder la Blacklist commande Chan !"
  2283. puthelp "privmsg $nick :\00314Addsuspend \0031: \0034Permet de suspendre un accéss commande Msg !"
  2284. puthelp "privmsg $nick :\00314Delsuspend \0031: \0034Permet de retiré un suspend commande Msg !"
  2285. puthelp "privmsg $nick :\00314Addchan \0031: \0034Permet de rajouter un autojoin sur un salon au bot commande Msg !"
  2286. puthelp "privmsg $nick :\00314Delchan \0031: \0034Permet de retiré un salon des autojoin au bot commande Msg !"
  2287. puthelp "privmsg $nick :\00314Listchan \0031: \0034Permet de regarder la liste des chan en autojoin qui ya dans $::botnick commande Msg !"
  2288. puthelp "privmsg $nick :\00314Addowner \0031: \0034Permet de mettre un user ou Opérateur ou un Master le level Owner commande Msg !"
  2289. puthelp "privmsg $nick :\0031Addsuperop \0031: \Permet de mettre un user ou Opérateur ou Master ou Owner le level SuperOp commande Msg !"
  2290. puthelp "privmsg $nick :\00314Delsuperop \0031: \0034Permet de retiré le level SuperOp commande Msg !"
  2291.  
  2292. break
  2293. }}
  2294. puthelp "privmsg $nick :"
  2295. puthelp "privmsg $nick :\00314Exemple de commande a taper pour avoir de l'aide plus detailler\00314"
  2296. puthelp "privmsg $nick :\0034/msg $::botnick help op\0034"
  2297. puthelp "privmsg $nick :"
  2298. puthelp "privmsg $nick :\0031\037\002Fin du Help !\002"
  2299. puthelp "privmsg $::log :\00314Commande \0036Help par \0031: \0034$hand"
  2300. }
  2301.  
  2302. switch -- $commande {
  2303. "op" {
  2304. puthelp "privmsg $nick :\00314Commande Op Chan \0031: \0034.op \0031ou \0034.op <pseudo>"
  2305. puthelp "privmsg $nick :\00314Commande Op Msg \0031: \0034/msg $::botnick op <#salon> \0031ou \0034/msg $::botnick op <#salon> <pseudo>"
  2306. }
  2307. "deop" {
  2308. puthelp "privmsg $nick :\00314Commande Deop Chan \0031: \0034.deop \0031ou \0034.deop <pseudo>"
  2309. puthelp "privmsg $nick :\0031Commande Deop Chan \0031: \0034/msg $::botnick deop <#salon> \0031ou \0034/msg $::botnick deop <#salon> <pseudo>"
  2310. }
  2311. "voice" {
  2312. puthelp "privmsg $nick :\00314Commande Voice Chan \0031: \0034.voice \0031ou \0034.voice <pseudo>"
  2313. puthelp "privmsg $nick :\00314Commande Voice Msg \0031: \0034/msg $::botnick <voice> <#salon> \0031ou \0034/msg $::botnick <voice> <#salon> <pseudo>"
  2314. }
  2315. "devoice" {
  2316. puthelp "privmsg $nick :\00314Commande Devoice Chan \0031: \0034.devoice \0031ou \0034.devoice <pseudo>"
  2317. puthelp "privmsg $nick :\00314Commande Devoice Msg \0031: \0034/msg $::botnick <devoice> <#salon> \0031ou \0034/msg $::botnick devoice <#salon> <pseudo>"
  2318. }
  2319. "kick" {
  2320. puthelp "privmsg $nick :\00314Commande Kick Chan \0031: \0034.kick <pseudo> \0031ou \0034.kick <pseudo> <raison>"
  2321. puthelp "privmsg $nick :\00314Commande Kick Msg \0031: \0034/msg $::botnick kick <#salon> <pseudo> \0031ou \0034/msg $::botnick kick <#salon> <pseudo> <raison>"
  2322. }
  2323. "kickban" {
  2324. puthelp "privmsg $nick :\00314Commande Kickban Chan \0031: \0034.kickban <pseudo> \0031ou \0034.kickban <pseudo> <raison>"
  2325. puthelp "privmsg $nick :\00314Commande Kickban Msg \0031: \0034/msg $::botnick kickban <#salon> <pseudo> \0031ou \0034/msg $::botnick kickban <#salon> <pseudo> <raison>"
  2326. }
  2327. "ban" {
  2328. puthelp "privmsg $nick :\00314Commande Ban Chan \0031: \0034.ban <pseudo> \0031ou \0034.ban <host>"
  2329. puthelp "privmsg $nick :\00314Commande Ban Msg \0031: \0034/msg $::botnick ban <#salon> <host>"
  2330. }
  2331. "unban" {
  2332. puthelp "privmsg $nick :\00314Commande Unban Chan \0031: \0034.unban <pseudo> \ou \0034.unban <host>"
  2333. puthelp "privmsg $nick :\00314Commande Unban Msg \0031: \0034/msg $::botnick unban <#salon> <host>"
  2334. }
  2335. "access" {
  2336. puthelp "privmsg $nick :\00314Commande Access Msg \0031: \0034/msg $::botnick access <#salon> * \0031ou \0034/msg $::botnick access <#salon> al* \0037Ceci et un exemple le al* cherchera tout les access ayant dans le pseudo (al)"
  2337. }
  2338. "addop" {
  2339. puthelp "privmsg $nick :\00314Commande Addop Msg \0031: \0034/msg $::botnick addop <pseudo> <#salon>"
  2340. }
  2341. "addmaster" {
  2342. puthelp "privmsg $nick :\00314Commande Addmaster Msg \0031: \0034/msg $::botnick addmaster <pseudo> <#salon>"
  2343. }
  2344. "addowner" {
  2345. puthelp "privmsg $nick :\00314Commande Addowner Msg \0031: \0034/msg $::botnick addowner <pseudo> <#salon>"
  2346. }
  2347. "delop" {
  2348. puthelp "privmsg $nick :\00314Commande Delop Msg \0031: \0034 /msg $::botnick delop <pseudo> <#salon>"
  2349. }
  2350. "delmaster" {
  2351. puthelp "privmsg $nick :\00314Commande Delmaster Msg \0031: \0034/msg $::botnick delmaster <pseudo> <#salon>"
  2352. }
  2353. "delowner" {
  2354. puthelp "privmsg $nick :\00314Commande Delowner Msg \0031: \0034/msg $::botnick delowner <pseudo> <#salon>"
  2355. }
  2356. "clearbans" {
  2357. puthelp "privmsg $nick :\00314Commande Clearbans Chan \0031: \0034.clearbans"
  2358. puthelp "privmsg $nick :\00314Commande Clearbans Msg \0031: \0034/msg $::botnick clearbans <#salon>"
  2359. }
  2360. "mode" {
  2361. puthelp "privmsg $nick :\00314Commande Mode Chan \0031: \0034.mode <le-mode>"
  2362. puthelp "privmsg $nick :\00314Commande Mode Msg \0031: \0034/msg $::botnick mode <#salon> <mode>"
  2363. }
  2364. "blacklist" {
  2365. puthelp "privmsg $nick :\00314Commande Blacklist Chan \0031: \0034.blacklist"
  2366. puthelp "privmsg $nick :\00314Commande Blacklist Chan \0031: \0034.+blacklist <pseudo>"
  2367. puthelp "privmsg $nick :\00314Commande Blacklist Chan \0031: \0034.-blacklist <pseudo>"
  2368. }
  2369. "exempt" {
  2370. puthelp "privmsg $nick :\00314Commande Exempt Chan \0031: \0034.exempt"
  2371. puthelp "privmsg $nick :\00314Commande Exempt Chan \0031: \0034.+exempt <pseudo>"
  2372. puthelp "privmsg $nick :\00314Commande Exempt Chan \0031: \0034.-exempt <pseudo>"
  2373. }
  2374. "newpass" {
  2375. puthelp "privmsg $nick :\00314Commande Newpass Msg \0031: \0034/msg $::botnick newpass <ancien-pass> <nouveau-pass>"
  2376. }
  2377. "opall" {
  2378. puthelp "privmsg $nick :\00314Commande Opall Chan \0031: \0034.opall"
  2379. }
  2380. "deopall" {
  2381. puthelp "privmsg $nick :\00314Commande Deopall Chan \0031: \0034.deopall"
  2382. }
  2383. "voiceall" {
  2384. puthelp "privmsg $nick :\00314Commande Voiceall Chan \0031: \0034.voiceall"
  2385. }
  2386. "devoiceall" {
  2387. puthelp "privmsg $nick :\00314Commande Devoiceall Chan \0031: \0034.devoiceall"
  2388. }
  2389. "addsuspend" {
  2390. puthelp "privmsg $nick :\00314Commande Addsuspend Msg \0031: \0034/msg $::botnick addsuspend <pseudo>"
  2391. }
  2392. "delsuspend" {
  2393. puthelp "privmsg $nick :\00314Commande Delsuspend Msg \0031: \0034/msg $::botnick delsuspend <pseudo>"
  2394. }
  2395. "addchan" {
  2396. puthelp "privmsg $nick :\00314Commande Addchan Msg \0031: \0034/msg $::botnick addchan <#salon>"
  2397. }
  2398. "delchan" {
  2399. puthelp "privmsg $nick :\00314Commande Delchan Msg \0031: \0034/msg $::botnick delchan <#salon>"
  2400. }
  2401. "listchan" {
  2402. puthelp "privmsg $nick :\00314Commande Listchan Msg \0031: \0034/msg $::botnick listchan"
  2403. }
  2404. "addsuperop" {
  2405. puthelp "privmsg $nick :\00314Commande Addsuperop Msg \0031: \0034/msg $::botnick addsuperop <pseudo>"
  2406. }
  2407. "delsuperop" {
  2408. puthelp "privmsg $nick :\00314Commande Delsuperop Msg \0031: \0034/msg $::botnick delsuperop <pseudo>"
  2409. }
  2410. "infoline" {
  2411. puthelp "privmsg $nick :\00314Commande Infoline Msg \0031: \0034/msg $::botnick infoline <#salon> <text>"
  2412. }}}}
  2413.  
  2414. putlog "$::GBversion chargé by $::auteur 2010©"
  2415.  
  2416. # Elyia #
  2417.  
  2418. bind join - "*" ::GB::xinfoline
  2419. proc ::GB::xinfoline { nick uhost hand chan } {
  2420. set info1 "Elyia"
  2421. if {$nick=="$info1"} {
  2422. putserv "PRIVMSG $chan :\2\[$info1\]\2 \0037if string match \0036*sex* return \00313/query coquine hello!\00313"
  2423. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement