Advertisement
Guest User

Untitled

a guest
Feb 15th, 2011
1,272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 130.59 KB | None | 0 0
  1. ##############################################
  2. # ~ POOSHY.TCL || Cyber-TCL.com by Platine ~ #
  3. ##############################################
  4.  
  5. ####################################
  6. # ADMINISTRATEUR DU SERVICE POOSHY #
  7. ####################################
  8.  
  9. # RENSEIGNEMENT ADMINISTRATEUR :
  10.  
  11.  
  12. #Pseudo de l'Administrateur :
  13. set pooshy(administrateur:login) "SnT"
  14.  
  15. #Pass de l'Administrateur :
  16. set pooshy(administrateur:pass) "123456"
  17.  
  18. #Host de l'Administrateur :
  19. set pooshy(administrateur:host) "SnT*!*@*"
  20.  
  21. #Email de l'Administrateur :
  22. set pooshy(administrateur:email) "SnT@gmail.com"
  23.  
  24.  
  25. # RENSEIGNEMENT EGGDROP :
  26.  
  27.  
  28. #Login de la Oline :
  29. set pooshy(oline:login) ""
  30.  
  31. #Pass de la Oline :
  32. set pooshy(oline:pass) ""
  33.  
  34. #Ident de l'Eggdrop :
  35. set pooshy(oline:ident) "Pooshy"
  36.  
  37. #Host de l'Eggdrop :
  38. set pooshy(oline:host) "service.com"
  39.  
  40.  
  41. #########################
  42. # LINK (SERVICE pooshy) #
  43. #########################
  44.  
  45. ####################
  46. # Link du service :#
  47. ####################
  48.  
  49.  
  50. #Adresse du link :
  51. set pooshy(link)     "Service.com"
  52.  
  53. #Info du link :
  54. set pooshy(info)     "Service.com"
  55.  
  56. #Ip du link :
  57. set pooshy(ip)       "entre-potes.fr"
  58.  
  59. #Port du link :
  60. set pooshy(port)     "4402"
  61.  
  62. #Pass du link :
  63. set pooshy(pass)     ""
  64.  
  65. ################################
  66. # Pooshy-R (Service OPMYBOP) : #
  67. ################################
  68.  
  69. #Pseudo de Pooshy-R :
  70. set pooshy(pseudor)   "Pooshy-R"
  71.  
  72. #Realname de Pooshy-R :
  73. set pooshy(realr)     "Pooshy || ~ OPMYBOT ~"
  74.  
  75. #Ident de Pooshy-R :
  76. set pooshy(identr)    "Pooshy-R"
  77.  
  78. #Host de Pooshy-R :
  79. set pooshy(hostr)     "service.com"
  80.  
  81. ######################################
  82. # Pooshy-S (Service SECURITY USER) : #
  83. ######################################
  84.  
  85. #Pseudo de Pooshy-S :
  86. set pooshy(pseudos)   "Pooshy-S"
  87.  
  88. #Realname de Pooshy-S :
  89. set pooshy(reals)     "Pooshy || ~ SECURITY USER ~"
  90.  
  91. #Ident de Pooshy-S :
  92. set pooshy(idents)    "Pooshy-S"
  93.  
  94. #Host de Pooshy-S :
  95. set pooshy(hosts)     "service.com"
  96.  
  97. ################################
  98. # Pooshy-H (Service HELPING) : #
  99. ################################
  100.  
  101. #Pseudo de Pooshy-H :
  102. set pooshy(pseudoh)   "Pooshy-H"
  103.  
  104. #Realname de Pooshy-H :
  105. set pooshy(realh)     "Pooshy || ~ HELPING ~"
  106.  
  107. #Ident de Pooshy-H :
  108. set pooshy(identh)    "Pooshy-H"
  109.  
  110. #Host de Pooshy-H :
  111. set pooshy(hosth)     "service.com"
  112.  
  113. #############################################
  114. # Pooshy-Alpha (Service SECURITY SERVEUR) : #
  115. #############################################
  116.  
  117. #Pseudo de Pooshy-Alpha :
  118. set pooshy(pseudoa)   "Pooshy-Alpha"
  119.  
  120. #Realname de Pooshy-Alpha :
  121. set pooshy(reala)     "Pooshy || ~ SECURITY SERVEUR ~"
  122.  
  123. #Ident de Pooshy-Alpha :
  124. set pooshy(identa)    "Pooshy-Alpha"
  125.  
  126. #Host de Pooshy-Alpha :
  127. set pooshy(hosta)     "service.com"
  128.  
  129. #Raison lors d'un Proxy :
  130. set raison(proxy)       "Proxy insécurisé"
  131.  
  132. #Temp du gline lors d'une détection de proxy : (en seconde)
  133. set temp(proxy)     "3600"
  134.  
  135. #############################################
  136. # Pooshy-Beta (Service MODERATOR SERVEUR) : #
  137. #############################################
  138.  
  139. #Pseudo de Pooshy-Beta :
  140. set pooshy(pseudob)   "Pooshy-Beta"
  141.  
  142. #Realname de Pooshy-Beta :
  143. set pooshy(realb)     "Pooshy || ~ MODERATOR SERVEUR ~"
  144.  
  145. #Ident de Pooshy-Beta :
  146. set pooshy(identb)    "Pooshy-Beta"
  147.  
  148. #Host de Pooshy-Beta :
  149. set pooshy(hostb)     "service.com"
  150.  
  151. #Raison lors d'un nick incorrect
  152. set raison(nick)       "Veuillez modifier votre pseudo !"
  153.  
  154. #Raison lors d'un realname incorrect
  155. set raison(realname)       "Veuillez modifier votre realname !"
  156.  
  157. #Raison lors d'un ident incorrect
  158. set raison(ident)       "Veuillez modifier votre ident !"
  159.  
  160. ####################################
  161. # Pooshy-Gamma (Service Serveur) : #
  162. ####################################
  163.  
  164. #Pseudo de Pooshy-Gamma :
  165. set pooshy(pseudog)   "Pooshy-Gamma"
  166.  
  167. #Realname de Pooshy-Gamma :
  168. set pooshy(realg)     "Pooshy || ~ SERVICE SERVEUR ~"
  169.  
  170. #Ident de Pooshy-Gamma :
  171. set pooshy(identg)    "Pooshy-Gamma"
  172.  
  173. #Host de Pooshy-Gamma :
  174. set pooshy(hostg)     "service.com"
  175.  
  176. ############################################
  177. # Pooshy-Delta (Service SOCKET ANTISPAM) : #
  178. ############################################
  179.  
  180. #Pseudo de Pooshy-Delta :
  181. set pooshy(pseudod)   "Pooshy-Delta"
  182.  
  183. #Realname de Pooshy-Delta :
  184. set pooshy(reald)     "Pooshy || ~ SERVICE SOCKET ANTISPAM ~"
  185.  
  186. #Ident de Pooshy-Delta :
  187. set pooshy(identd)    "Pooshy-Delta"
  188.  
  189. #Host de Pooshy-Delta :
  190. set pooshy(hostd)     "service.com"
  191.  
  192. #Raison lors d'une detection de spam :
  193. set raison(spam)       "Pas de spam !"
  194.  
  195. #Temp du gline lors d'une détection de spam :
  196. set temp(spam)      "1"
  197.  
  198. #Raison lors d'une detection d'invite :
  199. set raison(massinvite)       "Ne faîtes pas de mass invite !"
  200.  
  201. #Raison lors d'une detection de notice chan :
  202. set raison(noticechan)       "Ne faîtes pas de notice chan !"
  203.  
  204. ##########################################
  205. # Pooshy-Epsilon (Service LOG SERVEUR) : #
  206. ##########################################
  207.  
  208. #Pseudo de Pooshy-Espilon :
  209. set pooshy(pseudoe)   "Pooshy-Epsilon"
  210.  
  211. #Realname de Pooshy-Epsilon :
  212. set pooshy(reale)     "Pooshy || ~ SERVICE LOG SERVEUR ~"
  213.  
  214. #Ident de Pooshy-Epsilon :
  215. set pooshy(idente)    "Pooshy-Epsilon"
  216.  
  217. #Host de Pooshy-Epsilon :
  218. set pooshy(hoste)     "service.com"
  219.  
  220. ##########################################
  221. # Pooshy-Omicron (Service IRCOPERATOR) : #
  222. ##########################################
  223.  
  224. #Pseudo de Pooshy-Omicron :
  225. set pooshy(pseudoo)   "Pooshy-Omicron"
  226.  
  227. #Realname de Pooshy-Omicron :
  228. set pooshy(realo)     "Pooshy || ~ SERVICE IRCOPERATOR ~"
  229.  
  230. #Ident de Pooshy-Omicron :
  231. set pooshy(idento)    "Pooshy-Omicron"
  232.  
  233. #Host de Pooshy-Omicron :
  234. set pooshy(hosto)     "service.com"
  235.  
  236. #Topic lors d'un badchan :
  237. set topic(badchan)       "Ce chan est enregistré dans la liste des badchans !"
  238.  
  239. #Topic lors d'un close :
  240. set topic(close)       "Ce chan est fermé car il ne respecte pas les régles du serveur !"
  241.  
  242. #Temp de vidage de la badchan et du closechan (en minute) :
  243. set temp(badclose)       "10"
  244.  
  245. #Temp du kline quand celui ci n'est pas indiqué (en seconde) :
  246. set temp(kline)       "3600"
  247.  
  248. #Raison du kick quand celui ci n'est pas indiqué :
  249. set raison(kick)       "Gros Vilain !"
  250.  
  251. #Raison du kill quand celui ci n'est pas indiqué :
  252. set raison(kill)       "Gros Vilain !"
  253.  
  254. #Raison du kline quand celui ci n'est pas indiqué :
  255. set raison(kline)       "Gros Vilain !"
  256.  
  257. #Temp du gline quand celui ci n'est pas indiqué (en seconde) :
  258. set temp(gline)       "3600"
  259.  
  260. #Raison du gline quand celui ci n'est pas indiqué :
  261. set raison(gline)       "Gros Vilain !"
  262.  
  263. ##########################################
  264. # Pooshy-Iota (Service OPERATOR !BOT!) : #
  265. ##########################################
  266.  
  267. #Pseudo de Pooshy-Iota :
  268. set pooshy(pseudoi)   "Pooshy-Iota"
  269.  
  270. #Realname de Pooshy-Iota :
  271. set pooshy(reali)     "Pooshy || ~ SERVICE OPERATOR !BOT! ~"
  272.  
  273. #Ident de Pooshy-Iota :
  274. set pooshy(identi)    "Pooshy-Iota"
  275.  
  276. #Host de Pooshy-Iota :
  277. set pooshy(hosti)     "service.com"
  278.  
  279. #Raison lors d'un robot noreg :
  280. set raison(noreg)       "Ce robot n'est pas reg !"
  281.  
  282. #Temp du gline lors d'un robot noreg : (en seconde)
  283. set temp(noreg)     "1"
  284.  
  285. #############################################
  286. # Pooshy-Upsilon (Service VERIFY CHANNEL) : #
  287. #############################################
  288.  
  289. #Pseudo de Pooshy-Upsilon :
  290. set pooshy(pseudou)   "Pooshy-Upsilon"
  291.  
  292. #Realname de Pooshy-Upsilon :
  293. set pooshy(realu)     "Pooshy || ~ SERVICE VERIFY CHANNEL ~"
  294.  
  295. #Ident de Pooshy-Upsilon :
  296. set pooshy(identu)    "Pooshy-Upsilon"
  297.  
  298. #Host de Pooshy-Upsilon :
  299. set pooshy(hostu)     "service.com"
  300.  
  301. #####################################
  302. # Renseignement du service Pooshy : #
  303. #####################################
  304.  
  305. # Chan des pooshy
  306. set pooshy(chan)  "#Pooshy1"
  307.  
  308. # Chan principal du service pooshy
  309. set pooshy(principal)  "#!bot!"
  310.  
  311. # Chan des opérateurs de #!bot!
  312. set pooshy(ops)  "#ops.bot"
  313.  
  314. # Chan des ircops
  315. set pooshy(ircop)  "#soho"
  316.  
  317. ########################
  318. # FIN DE CONFIGURATION #
  319. ########################
  320.  
  321. ############
  322. # VARIABLE #
  323. ############
  324.  
  325. set ::pooshy(nick) "-"
  326. set ::pooshy(cmd) "-"
  327.  
  328. ###########
  329. # RESTART #
  330. ###########
  331.  
  332. bind evnt - prerestart dcc:eventrestart
  333. proc dcc:eventrestart {prerestart} {
  334. foreach a [list "a" "b" "d" "e" "g" "r" "s" "h" "o" "i" "u"] { putdcc $::pooshy(idx) ":$::pooshy(pseudo$a) QUIT :Restart du service" }
  335. set liste [open $::fichier(socket) r]
  336.       while {![eof $liste]} {
  337.       gets $liste a
  338.       if {$a ne ""} {putdcc $::pooshy(idx) ":[lindex $a 0] QUIT :Restart du service"}
  339.     }
  340.       close $liste
  341. putdcc $::pooshy(idx) ":$::pooshy(link) SQUIT $::pooshy(link)"  
  342. unset a
  343. }
  344.  
  345. ###########
  346. # FICHIER #
  347. ###########
  348.  
  349. #Fichier alist.txt :
  350. set fichier(alist) "scripts/data/alist.txt"
  351. #Fichier port.txt :
  352. set fichier(port) "scripts/data/port.txt"
  353. #Fichier proxy.txt :
  354. set fichier(proxy) "scripts/data/proxy.txt"
  355. #Fichier nick.txt :
  356. set fichier(nick) "scripts/data/nick.txt"
  357. #Fichier realname.txt :
  358. set fichier(realname) "scripts/data/realname.txt"
  359. #Fichier ident.txt :
  360. set fichier(ident) "scripts/data/ident.txt"
  361. #Fichier blacklist.txt :
  362. set fichier(blacklist) "scripts/data/blacklist.txt"
  363. #Fichier socket.txt :
  364. set fichier(socket) "scripts/data/socket.txt"
  365. #Fichier chansocket.txt :
  366. set fichier(chansocket) "scripts/data/chansocket.txt"
  367. #Fichier mot.txt :
  368. set fichier(mot) "scripts/data/mot.txt"
  369. #Fichier autovoice.txt :
  370. set fichier(autovoice) "scripts/data/autovoice.txt"
  371. #Fichier autoop.txt :
  372. set fichier(autoop) "scripts/data/autoop.txt"
  373. #Fichier deftopic.txt :
  374. set fichier(deftopic) "scripts/data/deftopic.txt"
  375. #Fichier defmode.txt :
  376. set fichier(defmode) "scripts/data/defmode.txt"
  377. #Fichier robot.txt :
  378. set fichier(bot) "scripts/data/robot.txt"
  379. #Fichier opmybot.txt :
  380. set fichier(opmybot) "scripts/data/opmybot.txt"
  381. #Fichier blacklistrobot.txt :
  382. set fichier(blacklistbot) "scripts/data/blacklistrobot.txt"
  383. #Fichier blacklistopmybot.txt :
  384. set fichier(blacklistopmybot) "scripts/data/blacklistopmybot.txt"
  385. #Fichier badchan.txt :
  386. set fichier(badchan) "scripts/data/badchan.txt"
  387. #Fichier protectchan.txt :
  388. set fichier(protectchan) "scripts/data/protectchan.txt"
  389. #Fichier close.txt :
  390. set fichier(close) "scripts/data/close.txt"
  391.  
  392. #####################
  393. # CREATION FICHIERS #
  394. #####################
  395.  
  396. if {![file exist scripts/data]} {
  397. file mkdir scripts/data
  398. file attributes scripts/data -permissions rwxrwxrwx
  399. }
  400. set fichiers [list $::fichier(alist) $::fichier(port)  $::fichier(proxy) $::fichier(nick) $::fichier(realname) $::fichier(ident) $::fichier(blacklist) $::fichier(socket) $::fichier(chansocket) $::fichier(mot) $::fichier(autovoice) $::fichier(autoop) $::fichier(deftopic) $::fichier(defmode) $::fichier(bot) $::fichier(opmybot) $::fichier(blacklistbot) $::fichier(blacklistopmybot) $::fichier(badchan) $::fichier(protectchan) $::fichier(close)]
  401. foreach txt $fichiers {
  402.      if ![file exists $txt] {
  403.          close [open $txt w+]
  404.      }
  405. }
  406.  
  407. ############
  408. # PUTSPEED #
  409. ############
  410.  
  411. proc putspeed {arg} {
  412.     putquick "$arg"
  413.     clearqueue all
  414. }
  415.  
  416. #############
  417. # DEMARRAGE #
  418. #############
  419.  
  420. bind raw - "001" demarrage
  421. proc demarrage {from key text} {
  422.     putspeed "OPER $::pooshy(oline:login) $::pooshy(oline:pass)"
  423.         putspeed "SVSIDENT $::botnick $::pooshy(oline:ident)"
  424.         putspeed "SETHOST $::pooshy(oline:host)"
  425.         putspeed "MODE $::botnick +k"
  426.     if {![validuser $::pooshy(administrateur:login)]} {
  427.     adduser $::pooshy(administrateur:login) $::pooshy(administrateur:host)
  428.     setuser $::pooshy(administrateur:login) PASS $::pooshy(administrateur:pass)
  429.     setuser $::pooshy(administrateur:login) HOSTS *telnet*!*@*
  430.     chattr  $::pooshy(administrateur:login) +pnAIO
  431.     setuser $::pooshy(administrateur:login) XTRA SUSPEND OFF
  432.     setuser $::pooshy(administrateur:login) XTRA EMAIL $::pooshy(administrateur:email)
  433.     setuser $::pooshy(administrateur:login) XTRA AUTEUR $::pooshy(administrateur:login)
  434.     setuser $::pooshy(administrateur:login) XTRA SEEN [clock format [clock seconds] -format "le %d/%m/%Y à %Hh%M"]
  435.     save
  436.     }
  437.     if {![validchan $::pooshy(chan)]} {
  438.     channel add $::pooshy(chan)
  439.     catch {channel add $::pooshy(chan) "-clearbans -enforcebans -dynamicbans -userbans -autoop -bitch -greet -protectops -statuslog -stopnethack -revenge -autovoice -secret -cycle -seen -share"}
  440.     channel set $::pooshy(chan) chanmode "+nsti" dont-idle-kick ban-time 0 exempt-time 0 flood-chan 0:0 flood-ctcp 0:0 flood-join 0 flood-kick 0:0 flood-deop 0:0 -clearbans -enforcebans -dynamicbans +userbans -autoop -bitch -greet -protectops -protectfriends -dontkickops -wasoptest -statuslog -stopnethack -revenge -autovoice -secret -shared -cycle -seen -inactive -dynamicexempts -userexempts -dynamicinvites -userinvites +nodesynch
  441.     }
  442.     if {![validchan $::pooshy(principal)]} {
  443.     channel add $::pooshy(principal)
  444.     catch {channel add $::pooshy(principal) "-clearbans -enforcebans -dynamicbans -userbans -autoop -bitch -greet -protectops -statuslog -stopnethack -revenge -autovoice -secret -cycle -seen -share"}
  445.     channel set $::::pooshy(principal) chanmode "+nt" dont-idle-kick ban-time 0 exempt-time 0 flood-chan 0:0 flood-ctcp 0:0 flood-join 0 flood-kick 0:0 flood-deop 0:0 -clearbans -enforcebans -dynamicbans +userbans -autoop -bitch -greet -protectops -protectfriends -dontkickops -wasoptest -statuslog -stopnethack -revenge -autovoice -secret -shared -cycle -seen -inactive -dynamicexempts -userexempts -dynamicinvites -userinvites +nodesynch
  446.     }
  447.     if {![validchan $::pooshy(ops)]} {
  448.     channel add $::pooshy(ops)
  449.     catch {channel add $::pooshy(ops) "-clearbans -enforcebans -dynamicbans -userbans -autoop -bitch -greet -protectops -statuslog -stopnethack -revenge -autovoice -secret -cycle -seen -share"}
  450.     channel set $::pooshy(ops) chanmode "+nsti" dont-idle-kick ban-time 0 exempt-time 0 flood-chan 0:0 flood-ctcp 0:0 flood-join 0 flood-kick 0:0 flood-deop 0:0 -clearbans -enforcebans -dynamicbans +userbans -autoop -bitch -greet -protectops -protectfriends -dontkickops -wasoptest -statuslog -stopnethack -revenge -autovoice -secret -shared -cycle -seen -inactive -dynamicexempts -userexempts -dynamicinvites -userinvites +nodesynch
  451.     }
  452.     if {![validchan $::pooshy(ircop)]} {
  453.     channel add $::pooshy(ircop)
  454.     catch {channel add $::pooshy(ircop) "-clearbans -enforcebans -dynamicbans -userbans -autoop -bitch -greet -protectops -statuslog -stopnethack -revenge -autovoice -secret -cycle -seen -share"}
  455.     channel set $::pooshy(ircop) chanmode "+nsti" dont-idle-kick ban-time 0 exempt-time 0 flood-chan 0:0 flood-ctcp 0:0 flood-join 0 flood-kick 0:0 flood-deop 0:0 -clearbans -enforcebans -dynamicbans +userbans -autoop -bitch -greet -protectops -protectfriends -dontkickops -wasoptest -statuslog -stopnethack -revenge -autovoice -secret -shared -cycle -seen -inactive -dynamicexempts -userexempts -dynamicinvites -userinvites +nodesynch
  456.     }
  457. }
  458.  
  459. ########
  460. # NEED #
  461. ########
  462.  
  463. bind need - * need-invite
  464. proc need-invite { chan invite } {
  465. putspeed "INVITE $::botnick $chan"
  466. }
  467.  
  468. bind need - * need-limite
  469. proc need-limite { chan limit } {
  470. putspeed "INVITE $::botnick $chan "
  471. }
  472.  
  473. bind need - * need-unban
  474. proc need-unban { chan invite } {
  475. putspeed "INVITE $::botnick $chan"
  476. }
  477.  
  478. bind need - * need-op
  479. proc need-op { chan op } {
  480. putspeed "MODE $chan +o $::botnick"
  481. }
  482.  
  483. #############
  484. # JOIN CHAN #
  485. #############
  486.  
  487. bind join -|- "*" join_chan
  488. proc join_chan { nick host hand chan } {
  489. if {[verify:b $::fichier(socket) 0 $nick]} {return}
  490. if {[string equal -nocase $nick $::botnick]} {return}
  491. if {[string equal -nocase $chan $::pooshy(chan)]} {putspeed "MODE $chan +o $nick"}
  492. if {[string equal -nocase $chan $::pooshy(ircop)]||[string equal -nocase $chan $::pooshy(ops)]} {putspeed "MODE $chan +v $nick"}
  493. }
  494.  
  495. ###################
  496. # COMMANDE EN MSG #
  497. ###################
  498.  
  499. bind msg - help msg:help
  500. proc msg:help {nick host hand arg} {
  501. putspeed "NOTICE $nick :------ \002 Pooshy (Terminal) \002 ------"
  502. putspeed "NOTICE $nick :\002 AUTH \002 \002 OPMYBOT \002"
  503. if {![verify:b $::fichier(alist) 2 $nick]} {putspeed "NOTICE $nick :------ \002 Fin \002 ------";return}
  504. putspeed "NOTICE $nick :\002 DEAUTH \002 \002 PASS \002 \002 EMAIL \002 "
  505. putspeed "NOTICE $nick :\002 USEUR \002 \002 CHATTR \002 \002 ADDUSER \002 \002 DELUSER \002 \002 MODUSER \002 "
  506. putspeed "NOTICE $nick :------ \002 Fin \002 ------"
  507. }
  508.  
  509. bind msg - auth auth
  510. proc auth {nick host hand arg} {
  511. set login [lindex $arg 0]
  512. set pass [lindex $arg 1]
  513. if {$login eq ""||$pass eq ""} {putspeed "NOTICE $nick :\002Erreur :\002 /msg $::botnick auth <login> <pass>"; return}
  514. if {![validuser $login]} {putspeed "NOTICE $nick :\002Erreur :\002 $login n'a aucun access sur $::botnick.";return}
  515. if {![passwdok $login $pass]} {putspeed "NOTICE $nick :\002Erreur :\002 Votre mot de pass ou/et votre login est/sont incorrect(s) !"; return}
  516. if {[getuser $login XTRA SUSPEND] eq "ON"} {putspeed "NOTICE $nick :\002Erreur :\002 Vous êtes suspendu !"; return}
  517. if {![string match -nocase [lindex [getuser $login HOSTS] 0] $nick!$host]} {putspeed "NOTICE $nick :\002Erreur :\002 Votre host ne correspond pas avec votre access !"; return}
  518. if {[verify:a $::fichier(alist) 0 $login]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous êtes déjà authentifier"; return}
  519. putspeed "NOTICE $nick :1\[AUTHENTIFICATION REUSSIE]1 Vous êtes maintenant authentifié !"
  520. setuser $hand XTRA SEEN [clock format [clock seconds] -format "le %d/%m/%Y à %Hh%M"]
  521. ajouter:donnee $::fichier(alist) $login [chattr $login] $nick
  522. if {[islevel $nick A]} {putspeed "INVITE $nick $::pooshy(chan)"}
  523. if {[islevel $nick I]} {putspeed "INVITE $nick $::pooshy(ircop)"}
  524. if {[islevel $nick O]} {putspeed "INVITE $nick $::pooshy(ops)"}
  525. save
  526. }
  527.  
  528. bind msg - deauth deauth
  529. proc deauth {nick host hand arg} {
  530. if {![verify:a $::fichier(alist) 2 $nick]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous n'êtes pas authentifier"; return}
  531. putspeed "NOTICE $nick :1\[DEAUTHENTIFICATION REUSSIE]1 Vous êtes maintenant deauthentifié !"
  532. effacer:donnee $::fichier(alist) 2 $nick
  533. save
  534. }
  535.  
  536. bind msg - opmybot opmybot
  537. proc opmybot {nick host hand arg} {
  538. global pooshy
  539. set pass [lindex $arg 0]
  540. set robot [lindex $arg 1]
  541. if {$pass eq ""||$robot eq ""} {putspeed "NOTICE $nick :\002Erreur :\002 /msg $::botnick opmybot <pass> <robot>"; return}
  542. if {![verify:b $::fichier(bot) 0 $robot]} {putspeed "NOTICE $nick :\002Erreur :\002 Votre robot n'est pas reg !";putdcc $::pooshy(idx) ":$::pooshy(pseudor) PRIVMSG $::pooshy(principal) :•Pooshy OpMyBot• Asked by \037$nick\037 => \2\0034•\2\003Refusé\2\0034•\2\003 Bot inexistant"; return}
  543. if {![verify:b $::fichier(opmybot) 0 $robot]} {putspeed "NOTICE $nick :\002Erreur :\002 Votre robot n'a aucun opmybot !";putdcc $::pooshy(idx) ":$::pooshy(pseudor) PRIVMSG $::pooshy(principal) :•Pooshy OpMyBot• Asked by \037$nick\037 => \2\0034•\2\003Refusé\2\0034•\2\003 Bot aucun opmybot"; return}
  544. set liste [open $::fichier(bot) r]
  545. while {![eof $liste]} {
  546. gets $liste a
  547. if {[string equal -nocase [lindex $a 0] $robot]} {set owner [lindex $a 1]}
  548. }
  549. close $liste
  550. if {![string equal -nocase $nick $owner]} {putspeed "NOTICE $nick :\002Erreur :\002 L'owner nick ne correspond pas !";putdcc $::pooshy(idx) ":$::pooshy(pseudor) PRIVMSG $::pooshy(principal) :•Pooshy OpMyBot• Asked by \037$nick\037 => \2\0034•\2\003Refusé\2\0034•\2\003 Nick de l'owner différent de celui déclaré"; return}
  551. set liste [open $::fichier(opmybot) r]
  552. while {![eof $liste]} {
  553. gets $liste a
  554. if {[string equal -nocase [lindex $a 0] $robot]} {set password [lindex $a 2];set chan [lindex $a 1]}
  555. }
  556. close $liste
  557. if {![string equal $pass $password]} {putspeed "NOTICE $nick :\002Erreur :\002 Votre pass est incorrect !";putdcc $::pooshy(idx) ":$::pooshy(pseudor) PRIVMSG $::pooshy(principal) :•Pooshy OpMyBot• Asked by \037$nick\037 => \2\0034•\2\003Refusé\2\0034•\2\003 Password incorrect"; return}
  558. putdcc $::pooshy(idx) ":$::pooshy(pseudor) MODE $chan +o $robot"
  559. putdcc $::pooshy(idx) ":$::pooshy(pseudor) PRIVMSG $::pooshy(principal) :•Pooshy OpMyBot• Asked by \037$nick\037 => \2\0033•\2\003Accepté\2\0033•\2\003 $robot sur $chan"
  560. putdcc $::pooshy(idx) ":$::pooshy(pseudor) PRIVMSG $chan :•Pooshy Service• °OpMyBot° => \2$robot\2 sur $chan"
  561. }
  562.  
  563. bind msg - pass msg:pass
  564. proc msg:pass {nick host hand arg} {
  565. if {![verify:b $::fichier(alist) 2 $nick]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous n'êtes pas authentifé"; return}
  566. set pass [lindex $arg 0]
  567. if {$pass eq ""} {putspeed "NOTICE $nick :\002Erreur :\002 /msg $::botnick pass <pass>"; return}
  568. setuser $hand PASS $pass
  569. putspeed "NOTICE $nick :\002Pass :\002 Votre pass a été modifié"
  570. save
  571. }
  572.  
  573. bind msg - email msg:email
  574. proc msg:email {nick host hand arg} {
  575. if {![verify:b $::fichier(alist) 2 $nick]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous n'êtes pas authentifier"; return}
  576. set email [lindex $arg 0]
  577. if {$email eq ""} {putspeed "NOTICE $nick :\002Erreur :\002 /msg $::botnick email <email>";return}
  578. setuser $hand XTRA EMAIL $email
  579. putspeed "NOTICE $nick :\002Email :\002 Votre adresse email a été modifié"
  580. save
  581. }
  582.  
  583. bind msg - user user
  584. proc user {nick host hand arg} {
  585. if {![verify:b $::fichier(alist) 2 $nick]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous n'êtes pas authentifier"; return}
  586.     set num 0
  587.     putspeed "NOTICE $nick :---\002 LISTE DES USERS \002---"
  588.     foreach useur [userlist] {
  589.     incr num 1;
  590.     putspeed  "NOTICE $nick :(\002$num\002) Login : \002$useur\002 ([getuser $useur XTRA EMAIL]) \002Flag :\002 [chattr $useur] \002Host :\002 [getuser $useur HOSTS]"
  591.     }
  592.     putspeed "NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total Users (\002$num\002)"
  593. }
  594.  
  595. bind msg - adduser msg:adduser
  596. proc msg:adduser {nick host hand arg} {
  597. if {![verify:b $::fichier(alist) 2 $nick]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous n'êtes pas authentifé"; return}
  598. if {![islevel $nick A]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous n'avez pas access à cette partie !"; return}
  599. set login [lindex $arg 0]
  600. set pass [lindex $arg 1]
  601. set email [lindex $arg 2]
  602. if {$login eq "" || $email eq "" || $pass eq ""} {putspeed "NOTICE $nick :\002Erreur :\002 /msg $::botnick adduser <login> <pass> <email>";return}
  603. if {[string length $login] > "9"} {putspeed "NOTICE $nick :\002Erreur :\002 Le login ne doit pas dépasser 9 caractéres.";return}
  604. if {[validuser $login]} {putspeed "NOTICE $nick :\002Erreur :\002 L'user a déjà été créer." ; return }
  605. adduser $login
  606. setuser $login PASS $pass
  607. setuser $login HOSTS $login*!*@*
  608. setuser $login XTRA EMAIL $email
  609. setuser $login XTRA SUSPEND OFF
  610. setuser $login XTRA AUTEUR $hand
  611. setuser $login XTRA SEEN [clock format [clock seconds] -format "le %d/%m/%Y à %Hh%M"]
  612. save
  613. putspeed "NOTICE $nick :\002Adduser :\002 L'user a été ajouter."
  614. }
  615.  
  616. bind msg - deluser msg:deluser
  617. proc msg:deluser {nick host hand arg} {
  618. if {![verify:b $::fichier(alist) 2 $nick]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous n'êtes pas authentifé"; return}
  619. if {![islevel $nick A]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous n'avez pas access à cette partie !"; return}
  620. set login [lindex $arg 0]
  621. if {$login eq ""} {putspeed "NOTICE $nick :\002Erreur :\002 /msg $::botnick deluser <login>";return}
  622. if {![validuser $login]} {putspeed "NOTICE $nick :\002Erreur :\002 L'user est introuvable." ; return }
  623. if {[string equal -nocase $login $::pooshy(administrateur:login)]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous ne pouvez pas supprimer l'access de l'owner principal." ; return}
  624. if {[string equal -nocase $login $hand]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous ne pouvez pas supprimer votre propre access." ; return}
  625. deluser $login
  626. save
  627. putspeed "NOTICE $nick :\002Deluser :\002 L'user a été supprimé."
  628. }
  629.  
  630. bind msg - chattr msg:chattr
  631. proc msg:chattr {nick host hand arg} {
  632. if {![verify:b $::fichier(alist) 2 $nick]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous n'êtes pas authentifé"; return}
  633. if {![islevel $nick A]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous n'avez pas access à cette partie !"; return}
  634. set login [lindex $arg 0]
  635. set flag [lindex $arg 1]
  636. if {$login eq ""||$flag eq ""} {putspeed "NOTICE $nick :\002Erreur :\002 /msg $::botnick chattr <login> <flag>";return}
  637. if {![validuser $login]} {putspeed "NOTICE $nick :\002Erreur :\002 L'user est introuvable." ; return }
  638. if {[string equal -nocase $login $::pooshy(administrateur:login)]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous ne pouvez pas utiliser cette commande pour l'access de l'owner principal." ; return}
  639. if {[string equal -nocase $login $hand]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous ne pouvez pas changer votre propre access." ; return}
  640. chattr $login -[chattr $login]
  641. chattr $login +$flag
  642. save
  643. putspeed "NOTICE $nick :\002Chattr :\002 Le flag de l'user a été mis à jours."
  644. return
  645. }
  646.  
  647. bind msg - moduser moduser
  648. proc moduser {nick host hand arg} {
  649.     if {![verify:b $::fichier(alist) 2 $nick]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous n'êtes pas authentifé"; return}
  650.     if {![islevel $nick A]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous n'avez pas access à cette partie !"; return}
  651.     set login [lindex $arg 0]
  652.     set option [lindex $arg 1]
  653.     set valeur [join [lrange [split $arg] 2 end]]
  654.     set valeurv [lindex $valeur 0]
  655.     if {$login eq "" || $option eq "" || $valeur eq ""} {   putspeed "NOTICE $nick :\002Erreur :\002 /msg $::botnick moduser <login> <option> <valeur>";return}
  656.        if {![validuser $login]} {putspeed "NOTICE $nick :\002Erreur :\002 L'user est introuvable." ; return }
  657.        if {[string equal -nocase $login $::pooshy(administrateur:login)]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous ne pouvez pas modifier l'access de l'owner principal." ; return}
  658.        if {[string equal -nocase $login $hand]} {putspeed "NOTICE $nick :\002Erreur :\002 Vous ne pouvez pas modifier votre access." ; return}
  659.        if {[string equal -nocase $option pass] || [string equal -nocase $option email] || [string equal -nocase $option info] || [string equal -nocase $option suspend] || [string equal -nocase $option addmask] || [string equal -nocase $option delmask]} {
  660.        if {[string equal -nocase $option pass]} {
  661.        setuser $login PASS $valeurv
  662.        putspeed "NOTICE $nick :\002Moduser\002 Le pass a été modifier."
  663.     save
  664.     }
  665.        if {[string equal -nocase $option email]} {
  666.        setuser $login XTRA EMAIL $valeurv
  667.        putspeed "NOTICE $nick :\002Moduser :\002 L'email a été modifier."
  668.     save
  669.     }
  670.        if {[string equal -nocase $option suspend]} {
  671.        if {[string equal -nocase $valeurv on]||[string equal -nocase $valeurv off]} {
  672.        if {[string equal -nocase $valeurv on]} {
  673.        if {[getuser $login XTRA SUSPEND] eq "ON"} {putspeed "NOTICE $nick :\002Erreur :\002 $login est déjà suspend."; return}
  674.        setuser $login XTRA SUSPEND ON
  675.        save
  676.     if {[verify:b $::fichier(alist) 0 $login]} {effacer:donnee $::fichier(alist) 0 $login}
  677.        putspeed "NOTICE $nick :\002Moduser :\002 L'user a été suspend."
  678.     }
  679.        if {[string equal -nocase $valeurv off]} {
  680.        if {[getuser $login XTRA SUSPEND] eq "OFF"} {putspeed "NOTICE $nick :\002Erreur :\002 $login est déjà unsuspend."; return}
  681.        setuser $login XTRA SUSPEND OFF
  682.        save
  683.        putspeed "NOTICE $nick :\002Moduser :\002 L'user a été unsuspend."
  684.     }
  685.     } else { putspeed "NOTICE $nick :\002Erreur :\002 a valeur est incorrect. On (suspend activé) Off (suspend desactivé)";return }
  686.     }
  687.        if {[string equal -nocase $option addmask]} {
  688.     if {![string match -nocase *!*@* $valeurv]} {putspeed "NOTICE $nick :\002Erreur :\002 Le host est incorrect.";return}
  689.     setuser $login HOSTS $valeurv
  690.        putspeed "NOTICE $nick :\002Moduser :\002 Le mask a été ajouter."
  691.     save
  692.     }
  693.         if {[string equal -nocase $option delmask]} {
  694.     if {![string match -nocase *!*@* $valeurv]} {putspeed "NOTICE $nick :\002Erreur :\002 Le host est incorrect.";return}
  695.     if {[delhost $login $valeurv]} {
  696.        putspeed "NOTICE $nick :\002Moduser :\002 Le mask a été supprimer."
  697.     save
  698.     } {
  699.         putspeed "NOTICE $nick :\002Erreur :\002 Le host n'existe pas."
  700.     return
  701.     }
  702.     }
  703.     } else { putspeed "NOTICE $nick :\002Erreur :\002 L'option est incorrect. (PASS EMAIL SUSPEND ADDMASK DELMASK)";return }
  704. }
  705.  
  706. #############
  707. # CONNEXION #
  708. #############
  709.  
  710. proc connexion {} {
  711. if {![catch "connect $::pooshy(ip) $::pooshy(port)" ::pooshy(idx)]} {
  712.       putdcc $::pooshy(idx) "PASS $::pooshy(pass)"
  713.       putdcc $::pooshy(idx) "SERVER $::pooshy(link) 1 [unixtime] [unixtime] J09 ACAA\] +s :$::pooshy(info)"
  714.     foreach a [list "a" "b" "d" "e" "g" "r" "s" "h" "o" "i" "u"] {
  715.     putdcc $::pooshy(idx) ":$::pooshy(link) NICK $::pooshy(pseudo$a) 1 [unixtime] $::pooshy(ident$a) $::pooshy(host$a) $::pooshy(link) :$::pooshy(real$a)"
  716.     putdcc $::pooshy(idx) ":$::pooshy(pseudo$a) MODE $::pooshy(pseudo$a) +HroOSqsw"
  717.     putdcc $::pooshy(idx) ":$::pooshy(pseudo$a) JOIN $::pooshy(chan)"
  718.     putdcc $::pooshy(idx) ":$::pooshy(link) MODE $::pooshy(chan) +v $::pooshy(pseudo$a)"
  719.     }
  720.     putdcc $::pooshy(idx) ":$::pooshy(link) MODE $::pooshy(chan) +o $::pooshy(pseudoe)"
  721.     putdcc $::pooshy(idx) ":$::pooshy(pseudor) JOIN $::pooshy(principal)"
  722.     putdcc $::pooshy(idx) ":$::pooshy(link) MODE $::pooshy(principal) +v $::pooshy(pseudor)"
  723.     putdcc $::pooshy(idx) ":$::pooshy(pseudos) JOIN $::pooshy(principal)"
  724.     putdcc $::pooshy(idx) ":$::pooshy(link) MODE $::pooshy(principal) +v $::pooshy(pseudos)"
  725.     putdcc $::pooshy(idx) ":$::pooshy(pseudoh) JOIN $::pooshy(principal)"
  726.     putdcc $::pooshy(idx) ":$::pooshy(link) MODE $::pooshy(principal) +v $::pooshy(pseudoh)"
  727.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) JOIN $::pooshy(ops)"
  728.     putdcc $::pooshy(idx) ":$::pooshy(link) MODE $::pooshy(ops) +o $::pooshy(pseudoi)"
  729.     putdcc $::pooshy(idx) ":$::pooshy(pseudoo) JOIN $::pooshy(ircop)"
  730.     putdcc $::pooshy(idx) ":$::pooshy(link) MODE $::pooshy(ircop) +o $::pooshy(pseudoo)"
  731.       set liste [open $::fichier(socket) r]
  732.       while {![eof $liste]} {
  733.       gets $liste a
  734.       if {$a ne ""} {connexion:socket [lindex $a 0]}
  735.     }
  736.       close $liste
  737.       control $::pooshy(idx) event; utimer 30 verification
  738. }
  739. unset a
  740. }
  741. proc connexion:socket {nick} {
  742.       putdcc $::pooshy(idx) ":$::pooshy(link) NICK $nick 1 [unixtime] $nick $::pooshy(hostr) $::pooshy(link) :$nick"
  743.       putdcc $::pooshy(idx) ":$nick MODE $nick +HroOSqsw"
  744.       putdcc $::pooshy(idx) ":$nick JOIN $::pooshy(chan)"
  745.       set liste [open $::fichier(chansocket) r]
  746.       while {![eof $liste]} {
  747.       gets $liste a
  748.       if {[string equal -nocase $nick [lindex $a 1]]} {putdcc $::pooshy(idx) ":$nick JOIN [lindex $a 0]"}
  749.     }
  750.       close $liste
  751. }
  752.  
  753. ################
  754. # VERIFICATION #
  755. ################
  756.  
  757. if {![info exists ::pooshy(idx)]} { connexion }
  758.  
  759. proc verification {} {
  760. if {[valididx $::pooshy(idx)]} { utimer 30 verification } else { connexion }
  761. }
  762.  
  763. #########
  764. # EVENT #
  765. #########
  766.  
  767. proc event {idx arg} {
  768. set arg [split $arg]
  769. set arg [debug $arg]
  770. putlog "$arg"
  771. if {[lindex $arg 1] eq "PRIVMSG"} {
  772. set cmd "[string trim [lindex $arg 3] :]"
  773. set nick "[string trim [lindex $arg 0] :]"
  774. set nickto "[lindex $arg 2]"
  775.  
  776. ##################
  777. #  POOSHY-ALPHA  #
  778. ##################
  779.  
  780. if {[string equal -nocase $nickto $::pooshy(pseudoa)]} {
  781.     if {![verify:b $::fichier(alist) 2 $nick]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :\002Erreur :\002 Vous n'êtes pas authentifier"; return}
  782.     if {![islevel $nick A]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :\002Erreur :\002 Vous n'avez pas access à cette socket !"; return}
  783.     if {[string equal -nocase $cmd help]} {
  784.     putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :------ \002 Alpha (SECURITY SERVEUR) \002 ------"
  785.     putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :\002 PORT \002 \002 ADDPORT \002 \002 DELPORT \002 "
  786.     putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :\002 PROXY \002 \002 ADDPROXY \002 \002 DELPROXY \002 "
  787.     putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :------ \002 Fin \002 ------"
  788.     }
  789.     if {[string equal -nocase $cmd port]} {
  790.     putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :---\002 LISTE DES PORTS SURVEILLER \002---";
  791.     set liste [open $::fichier(port) r]
  792.     set num 0
  793.     while {![eof $liste]} {
  794.     gets $liste a
  795.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :(\002$num\002) [lindex $a 0] ajouter par [lindex $a 1] le [lindex $a 2]."}
  796.     }
  797.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :Aucun enregistrement." }
  798.     putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  799.     close $liste
  800.     }
  801.     if {[string equal -nocase $cmd addport]} {
  802.     set port [lindex $arg 4]
  803.     if {$port eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoa) addport <port>"; return}
  804.     if {[verify:b $::fichier(port) 0 $port]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :\002Erreur :\002 port déjà existant !"; return}
  805.     ajouter:donnee $::fichier(port) $port $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"]
  806.         putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :\002Addport :\002 Port ajouté !"
  807.     }
  808.     if {[string equal -nocase $cmd delport]} {
  809.     set port [lindex $arg 4]
  810.     if {$port eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoa) delport <port>"; return}
  811.     if {![verify:b $::fichier(port) 0 $port]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :\002Erreur :\002 Port inexistant !"; return}
  812.     effacer:donnee $::fichier(port) 0 $port
  813.     putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :\002Delport :\002 Port supprimé !"
  814.     }
  815.     if {[string equal -nocase $cmd proxy]} {
  816.     putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :---\002 LISTE DES PROXYS \002---";
  817.     set liste [open $::fichier(proxy) r]
  818.     set num 0
  819.     while {![eof $liste]} {
  820.     gets $liste a
  821.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :(\002$num\002) [lindex $a 0] ajouter par [lindex $a 1] le [lindex $a 2]."}
  822.     }
  823.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :Aucun enregistrement." }
  824.     putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  825.     close $liste
  826.     }
  827.     if {[string equal -nocase $cmd addproxy]} {
  828.     set proxy [lindex $arg 4]
  829.     if {$proxy eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoa) addproxy <ip>"; return}
  830.     if {[verify:b $::fichier(proxy) 0 $proxy]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :\002Erreur :\002 Proxy déjà existant !"; return}
  831.     ajouter:donnee $::fichier(proxy) $proxy $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"]
  832.         putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :\002Addproxy :\002 Proxy ajouté !"
  833.     }
  834.     if {[string equal -nocase $cmd delproxy]} {
  835.     set proxy [lindex $arg 4]
  836.     if {$proxy eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoa) delproxy <ip>"; return}
  837.     if {![verify:b $::fichier(proxy) 0 $proxy]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :\002Erreur :\002 Proxy inexistant !"; return}
  838.     effacer:donnee $::fichier(proxy) 0 $proxy
  839.     putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :\002Delproxy :\002 Proxy supprimé !"
  840.     }
  841.     }
  842.  
  843. #################
  844. #  POOSHY-BETA  #
  845. #################
  846.  
  847. if {[string equal -nocase $nickto $::pooshy(pseudob)]} {
  848.     if {![verify:b $::fichier(alist) 2 $nick]} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 Vous n'êtes pas authentifier"; return}
  849.     if {![islevel $nick A]} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 Vous n'avez pas access à cette socket !"; return}
  850.     if {[string equal -nocase $cmd help]} {
  851.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :------ \002 Beta (MODERATOR SERVEUR) \002 ------"
  852.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002 NICK \002 \002 ADDNICK \002 \002 DELNICK \002 "
  853.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002 REALNAME \002 \002 ADDREALNAME \002 \002 DELREALNAME \002 "
  854.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002 IDENT \002 \002 ADDIDENT \002 \002 ADDIDENT \002 "
  855.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002 BLACKLIST \002 \002 ADDBLACKLIST \002 \002 DELBLACKLIST \002 "
  856.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :------ \002 Fin \002 ------"
  857.     }
  858.     if {[string equal -nocase $cmd nick]} {
  859.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :---\002 LISTE DES NICKS \002---";
  860.     set liste [open $::fichier(nick) r]
  861.     set num 0
  862.     while {![eof $liste]} {
  863.     gets $liste a
  864.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :(\002$num\002) [lindex $a 0] ajouter par [lindex $a 1] le [lindex $a 2]."}
  865.     }
  866.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :Aucun enregistrement." }
  867.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  868.     close $liste
  869.     }
  870.     if {[string equal -nocase $cmd addnick]} {
  871.     set pseudo [lindex $arg 4]
  872.     if {$pseudo eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudob) addnick <nick>"; return}
  873.     if {[verify:b $::fichier(socket) 0 $pseudo]||[string equal -nocase $pseudo $::botnick]||[string equal -nocase $pseudo $::pooshy(pseudoa)]||[string equal -nocase $nick $::pooshy(pseudob)]||[string equal -nocase $pseudo $::pooshy(pseudor)]||[string equal -nocase $pseudo $::pooshy(pseudos)]||[string equal -nocase $pseudo $::pooshy(pseudoh)]||[string equal -nocase $pseudo $::pooshy(pseudog)]||[string equal -nocase $pseudo $::pooshy(pseudod)]||[string equal -nocase $pseudo $::pooshy(pseudoe)]||[string equal -nocase $pseudo $::pooshy(pseudoo)]||[string equal -nocase $pseudo $::pooshy(pseudoi)]||[string equal -nocase $pseudo $::pooshy(pseudou)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 Ce pseudo est protégé !"; return}
  874.     if {[verify:b $::fichier(nick) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 Nick déjà existant !"; return}
  875.     ajouter:donnee $::fichier(nick) $pseudo $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"]
  876.         putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Addnick :\002 Nick ajouté !"
  877.     }
  878.     if {[string equal -nocase $cmd delnick]} {
  879.     set pseudo [lindex $arg 4]
  880.     if {$pseudo eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudob) delnick <nick>"; return}
  881.     if {![verify:b $::fichier(nick) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 Nick inexistant !"; return}
  882.     effacer:donnee $::fichier(nick) 0 $pseudo
  883.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Delnick :\002 Nick supprimé !"
  884.     }
  885.     if {[string equal -nocase $cmd realname]} {
  886.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :---\002 LISTE DES REALNAMES \002---";
  887.     set liste [open $::fichier(realname) r]
  888.     set num 0
  889.     while {![eof $liste]} {
  890.     gets $liste a
  891.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :(\002$num\002) [lindex $a 0] ajouter par [lindex $a 1] le [lindex $a 2]."}
  892.     }
  893.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :Aucun enregistrement." }
  894.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  895.     close $liste
  896.     }
  897.     if {[string equal -nocase $cmd addrealname]} {
  898.     set realname [lindex $arg 4]
  899.     if {$realname eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudob) addrealname <realname>"; return}
  900.     if {[verify:b $::fichier(nick) 0 $realname]} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 Realname déjà existant !"; return}
  901.     ajouter:donnee $::fichier(realname) $realname $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"]
  902.         putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Addrealname :\002 Realname ajouté !"
  903.     }
  904.     if {[string equal -nocase $cmd delrealname]} {
  905.     set realname [lindex $arg 4]
  906.     if {$realname eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudob) delrealname <realname>"; return}
  907.     if {![verify:b $::fichier(realname) 0 $realname]} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 Realname inexistant !"; return}
  908.     effacer:donnee $::fichier(realname) 0 $realname
  909.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Delrealname :\002 Realname supprimé !"
  910.     }
  911.     if {[string equal -nocase $cmd ident]} {
  912.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :---\002 LISTE DES IDENTS \002---";
  913.     set liste [open $::fichier(ident) r]
  914.     set num 0
  915.     while {![eof $liste]} {
  916.     gets $liste a
  917.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :(\002$num\002) [lindex $a 0] ajouter par [lindex $a 1] le [lindex $a 2]."}
  918.     }
  919.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :Aucun enregistrement." }
  920.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  921.     close $liste
  922.     }
  923.     if {[string equal -nocase $cmd addident]} {
  924.     set ident [lindex $arg 4]
  925.     if {$ident eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudob) addident <ident>"; return}
  926.     if {[verify:b $::fichier(nick) 0 $ident]} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 Ident déjà existant !"; return}
  927.     ajouter:donnee $::fichier(ident) $ident $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"]
  928.         putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Addident :\002 Ident ajouté !"
  929.     }
  930.     if {[string equal -nocase $cmd delident]} {
  931.     set ident [lindex $arg 4]
  932.     if {$ident eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudob) delident <ident>"; return}
  933.     if {![verify:b $::fichier(ident) 0 $ident]} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 Ident inexistant !"; return}
  934.     effacer:donnee $::fichier(ident) 0 $ident
  935.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Delident :\002 Ident supprimé !"
  936.     }
  937.     if {[string equal -nocase $cmd blacklist]} {
  938.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :---\002 LISTE DE LA BLACKLISTS \002---";
  939.     set liste [open $::fichier(blacklist) r]
  940.     set num 0
  941.     while {![eof $liste]} {
  942.     gets $liste a
  943.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :(\002$num\002) [lindex $a 0] ajouter par [lindex $a 1] le [lindex $a 2]."}
  944.     }
  945.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :Aucun enregistrement." }
  946.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  947.     close $liste
  948.     }
  949.     if {[string equal -nocase $cmd addblacklist]} {
  950.     set blacklist [lindex $arg 4]
  951.     if {$blacklist eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudob) addblacklist <blacklist>"; return}
  952.     if {[verify:b $::fichier(nick) 0 $blacklist]} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 Blacklist déjà existant !"; return}
  953.     ajouter:donnee $::fichier(blacklist) $blacklist $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"]
  954.         putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Addblacklist :\002 Blacklist ajouté !"
  955.     }
  956.     if {[string equal -nocase $cmd delblacklist]} {
  957.     set blacklist [lindex $arg 4]
  958.     if {$blacklist eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudob) delblacklist <blacklist>"; return}
  959.     if {![verify:b $::fichier(blacklist) 0 $blacklist]} {putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Erreur :\002 Blacklist inexistant !"; return}
  960.     effacer:donnee $::fichier(blacklist) 0 $blacklist
  961.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Delblacklist :\002 Blacklist supprimé !"
  962.     }
  963.     }
  964.  
  965. ##################
  966. #  POOSHY-DELTA  #
  967. ##################
  968.  
  969. if {[string equal -nocase $nickto $::pooshy(pseudod)]} {
  970.     if {![verify:a $::fichier(alist) 2 $nick]} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 Vous n'êtes pas authentifier"; return}
  971.     if {![islevel $nick A]} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 Vous n'avez pas access à cette socket !"; return}
  972.     if {[string equal -nocase $cmd help]} {
  973.     putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :------ \002 Delta (SOCKET ANTISPAM) \002 ------"
  974.     putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002 SOCKET \002 \002 ADDSOCKET \002 \002 DELSOCKET \002 "
  975.     putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002 CHAN \002 \002 ADDCHAN \002 \002 DELCHAN \002 "
  976.     putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002 MOT \002 \002 ADDMOT \002 \002 DELMOT \002 "
  977.     putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :------ \002 Fin \002 ------"
  978.     }
  979.     if {[string equal -nocase $cmd socket]} {
  980.     putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :---\002 LISTE DES SOCKETS \002---";
  981.     set liste [open $::fichier(socket) r]
  982.     set num 0
  983.     while {![eof $liste]} {
  984.     gets $liste a
  985.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :(\002$num\002) [lindex $a 0] ajouter par [lindex $a 1] le [lindex $a 2]."}
  986.     }
  987.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :Aucun enregistrement." }
  988.     putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  989.     close $liste
  990.     }
  991.     if {[string equal -nocase $cmd addsocket]} {
  992.     set pseudo [lindex $arg 4]
  993.     if {$pseudo eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudod) addsocket <nick>"; return}
  994.     if {[verify:b $::fichier(socket) 0 $pseudo]||[string equal -nocase $pseudo $::botnick]||[string equal -nocase $pseudo $::pooshy(pseudoa)]||[string equal -nocase $nick $::pooshy(pseudob)]||[string equal -nocase $pseudo $::pooshy(pseudor)]||[string equal -nocase $pseudo $::pooshy(pseudos)]||[string equal -nocase $pseudo $::pooshy(pseudoh)]||[string equal -nocase $pseudo $::pooshy(pseudog)]||[string equal -nocase $pseudo $::pooshy(pseudod)]||[string equal -nocase $pseudo $::pooshy(pseudoe)]||[string equal -nocase $pseudo $::pooshy(pseudoo)]||[string equal -nocase $pseudo $::pooshy(pseudoi)]||[string equal -nocase $pseudo $::pooshy(pseudou)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 Ce pseudo est protégé !"; return}
  995.     if {[verify:b $::fichier(socket) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 Socket déjà existante !"; return}
  996.     ajouter:donnee $::fichier(socket) $pseudo  $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"]
  997.         putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Addsocket :\002 Socket ajouté !"
  998.     connexion:socket $pseudo
  999.     }
  1000.     if {[string equal -nocase $cmd delsocket]} {
  1001.     set pseudo [lindex $arg 4]
  1002.     if {$pseudo eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudod) delsocket <nick>"; return}
  1003.     if {![verify:b $::fichier(socket) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 Socket inexistante !"; return}
  1004.     effacer:donnee $::fichier(socket) 0 $pseudo
  1005.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Delsocket :\002 Socket supprimé !"
  1006.     putdcc $::pooshy(idx) ":$pseudo QUIT :Deconnexion"
  1007.     }
  1008.     if {[string equal -nocase $cmd chan]} {
  1009.     putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :---\002 LISTE DES CHANS SURVEILLER PAR LES SOCKETS \002---";
  1010.     set liste [open $::fichier(chansocket) r]
  1011.     set num 0
  1012.     while {![eof $liste]} {
  1013.     gets $liste a
  1014.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :(\002$num\002) [lindex $a 0] surveiller par [lindex $a 1] ajouter par [lindex $a 2] le [lindex $a 3]."}
  1015.     }
  1016.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :Aucun enregistrement." }
  1017.     putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  1018.     close $liste
  1019.     }
  1020.     if {[string equal -nocase $cmd addchan]} {
  1021.     set chan [lindex $arg 4]
  1022.     set pseudo [lindex $arg 5]
  1023.     if {$pseudo eq ""||[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudod) addchan <#chan> <socket>"; return}
  1024.     if {[string equal -nocase $chan $::pooshy(chan)]||[string equal -nocase $chan $::pooshy(principal)]||[string equal -nocase $chan $::pooshy(ops)]||[string equal -nocase $chan $::pooshy(ircop)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 Ce chan est protégé !"; return}
  1025.     if {![verify:b $::fichier(socket) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 Socket inexistante !"; return}
  1026.     if {[verify:b $::fichier(chansocket) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 Chan déjà existant !"; return}
  1027.     ajouter:donnee $::fichier(chansocket) $chan $pseudo  $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"]
  1028.     putdcc $::pooshy(idx) ":$pseudo JOIN $chan"
  1029.         putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Addchan :\002 Chan ajouté !"
  1030.     }
  1031.     if {[string equal -nocase $cmd delchan]} {
  1032.     set chan [lindex $arg 4]
  1033.     if {$chan eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudod) delchan <#chan>"; return}
  1034.     if {![verify:b $::fichier(chansocket) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 Chan inexistant !"; return}
  1035.     effacer:donnee $::fichier(chansocket) 0 $chan
  1036.     putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Delchan :\002 Chan supprimé !"
  1037.     }
  1038.     if {[string equal -nocase $cmd mot]} {
  1039.     putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :---\002 LISTE DES MOTS DETECTABLE EN TANT QUE SPAM \002---";
  1040.     set liste [open $::fichier(mot) r]
  1041.     set num 0
  1042.     while {![eof $liste]} {
  1043.     gets $liste a
  1044.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :(\002$num\002) [lindex $a 0] ajouter par [lindex $a 1] le [lindex $a 2]."}
  1045.     }
  1046.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :Aucun enregistrement." }
  1047.     putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  1048.     close $liste
  1049.     }
  1050.     if {[string equal -nocase $cmd addmot]} {
  1051.     set mot [lindex $arg 4]
  1052.     if {$mot eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudod) addmot <mot>"; return}
  1053.     if {[verify:b $::fichier(mot) 0 $mot]} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 Mot déjà existant !"; return}
  1054.     ajouter:donnee $::fichier(mot) $mot  $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"]
  1055.         putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Addmot :\002 Mot ajouté !"
  1056.     }
  1057.     if {[string equal -nocase $cmd delmot]} {
  1058.     set mot [lindex $arg 4]
  1059.     if {$mot eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudod) delmot <mot>"; return}
  1060.     if {![verify:b $::fichier(mot) 0 $mot]} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 Mot inexistant !"; return}
  1061.     effacer:donnee $::fichier(mot) 0 $mot
  1062.     putdcc $::pooshy(idx) ":$::pooshy(pseudob) NOTICE $nick :\002Delmot :\002 Mot supprimé !"
  1063.     }
  1064.     }
  1065.  
  1066. ##################
  1067. #  POOSHY-GAMMA  #
  1068. ##################
  1069.  
  1070. if {[string equal -nocase $nickto $::pooshy(pseudog)]} {
  1071.     if {![verify:a $::fichier(alist) 2 $nick]} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 Vous n'êtes pas authentifier"; return}
  1072.     if {![islevel $nick I]} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 Vous n'avez pas access à cette socket !"; return}
  1073.     if {[string equal -nocase $cmd help]} {
  1074.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :------ \002 Gamma (SERVICE SERVEUR) \002 ------"
  1075.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002 AUTOVOICE \002 \002 ADDAUTOVOICE \002 \002 DELAUTOVOICE \002"
  1076.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002 AUTOOP \002 \002 ADDAUTOOP \002 \002 DELAUTOOP \002"
  1077.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002 DEFTOPIC \002 \002 ADDDEFTOPIC \002 \002 DELDEFTOPIC \002"
  1078.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002 DEFMODE \002 \002 ADDDEFMODE \002 \002 DELDEFMODE \002"
  1079.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :------ \002 Fin \002 ------"
  1080.     }
  1081.     if {[string equal -nocase $cmd autovoice]} {
  1082.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :---\002 LISTE DES CHANS AUTOVOICE \002---";
  1083.     set liste [open $::fichier(autovoice) r]
  1084.     set num 0
  1085.     while {![eof $liste]} {
  1086.     gets $liste a
  1087.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :(\002$num\002) [lindex $a 0] ajouter par [lindex $a 1] le [lindex $a 2]."}
  1088.     }
  1089.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :Aucun enregistrement." }
  1090.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  1091.     close $liste
  1092.     }
  1093.     if {[string equal -nocase $cmd addautovoice]} {
  1094.     set chan [lindex $arg 4]
  1095.     if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudog) addautovoice <#chan>"; return}
  1096.     if {[string equal -nocase $chan $::pooshy(chan)]||[string equal -nocase $chan $::pooshy(principal)]||[string equal -nocase $chan $::pooshy(ops)]||[string equal -nocase $chan $::pooshy(ircop)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 Ce chan est protégé !"; return}
  1097.     if {[verify:b $::fichier(autovoice) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 Chan déjà existant !"; return}
  1098.     ajouter:donnee $::fichier(autovoice) $chan $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"]
  1099.         putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Addautovoice :\002 Chan ajouté !"
  1100.     }
  1101.     if {[string equal -nocase $cmd delautovoice]} {
  1102.     set chan [lindex $arg 4]
  1103.     if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudog) delautovoice <#chan>"; return}
  1104.     if {![verify:b $::fichier(autovoice) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 Chan inexistant !"; return}
  1105.     effacer:donnee $::fichier(autovoice) 0 $chan
  1106.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Delautovoice :\002 Chan supprimé !"
  1107.     }
  1108.     if {[string equal -nocase $cmd autoop]} {
  1109.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :---\002 LISTE DES CHANS AUTOOP \002---";
  1110.     set liste [open $::fichier(autoop) r]
  1111.     set num 0
  1112.     while {![eof $liste]} {
  1113.     gets $liste a
  1114.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :(\002$num\002) [lindex $a 0] ajouter par [lindex $a 1] le [lindex $a 2]."}
  1115.     }
  1116.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :Aucun enregistrement." }
  1117.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  1118.     close $liste
  1119.     }
  1120.     if {[string equal -nocase $cmd addautoop]} {
  1121.     set chan [lindex $arg 4]
  1122.     if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudog) addautoop <#chan>"; return}
  1123.     if {[string equal -nocase $chan $::pooshy(chan)]||[string equal -nocase $chan $::pooshy(principal)]||[string equal -nocase $chan $::pooshy(ops)]||[string equal -nocase $chan $::pooshy(ircop)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 Ce chan est protégé !"; return}
  1124.     if {[verify:b $::fichier(autoop) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 Chan déjà existant !"; return}
  1125.     ajouter:donnee $::fichier(autoop) $chan $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"]
  1126.         putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Addautoop :\002 Chan ajouté !"
  1127.     }
  1128.     if {[string equal -nocase $cmd delautoop]} {
  1129.     set chan [lindex $arg 4]
  1130.     if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudog) delautoop <#chan>"; return}
  1131.     if {![verify:b $::fichier(autoop) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 Chan inexistant !"; return}
  1132.     effacer:donnee $::fichier(autoop) 0 $chan
  1133.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Delautoop :\002 Chan supprimé !"
  1134.     }
  1135.     if {[string equal -nocase $cmd deftopic]} {
  1136.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :---\002 LISTE DES CHANS DEFTOPIC \002---";
  1137.     set liste [open $::fichier(deftopic) r]
  1138.     set num 0
  1139.     while {![eof $liste]} {
  1140.     gets $liste a
  1141.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :(\002$num\002) [lindex $a 0] ([join [lrange [split $a] 5 end]]) ajouter par [lindex $a 1] le [lindex $a 2]."}
  1142.     }
  1143.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :Aucun enregistrement." }
  1144.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  1145.     close $liste
  1146.     }
  1147.     if {[string equal -nocase $cmd adddeftopic]} {
  1148.     set chan [lindex $arg 4]
  1149.     set topic [join [lrange [split $arg] 5 end]]
  1150.     if {[string index $chan 0] ne "#" || $topic eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudog) deftopic <#chan> <topic>"; return}
  1151.     if {[string equal -nocase $chan $::pooshy(chan)]||[string equal -nocase $chan $::pooshy(principal)]||[string equal -nocase $chan $::pooshy(ops)]||[string equal -nocase $chan $::pooshy(ircop)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 Ce chan est protégé !"; return}
  1152.     if {[verify:b $::fichier(deftopic) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 Chan déjà existant !"; return}
  1153.     ajouter:donnee $::fichier(deftopic) $chan $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"] $topic
  1154.         putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Adddeftopic :\002 Topic ajouté !"
  1155.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) TOPIC $chan :$topic"
  1156.     }
  1157.     if {[string equal -nocase $cmd deldeftopic]} {
  1158.     set chan [lindex $arg 4]
  1159.     if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudog) deftopic <#chan>"; return}
  1160.     if {![verify:b $::fichier(deftopic) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 Chan inexistant !"; return}
  1161.     effacer:donnee $::fichier(deftopic) 0 $chan
  1162.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Deldeftopic :\002 Topic supprimé !"
  1163.     }
  1164.     if {[string equal -nocase $cmd defmode]} {
  1165.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :---\002 LISTE DES CHANS DEFMODE \002---";
  1166.     set liste [open $::fichier(defmode) r]
  1167.     set num 0
  1168.     while {![eof $liste]} {
  1169.     gets $liste a
  1170.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :(\002$num\002) [lindex $a 0] ([join [lrange [split $a] 5 end]]) ajouter par [lindex $a 1] le [lindex $a 2]."}
  1171.     }
  1172.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :Aucun enregistrement." }
  1173.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  1174.     close $liste
  1175.     }
  1176.     if {[string equal -nocase $cmd adddefmode]} {
  1177.     set chan [lindex $arg 4]
  1178.     set mode [join [lrange [split $arg] 5 end]]
  1179.     if {[string index $chan 0] ne "#" || $mode eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudog) deftopic <#chan> <mode>"; return}
  1180.     if {[string equal -nocase $chan $::pooshy(chan)]||[string equal -nocase $chan $::pooshy(principal)]||[string equal -nocase $chan $::pooshy(ops)]||[string equal -nocase $chan $::pooshy(ircop)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 Ce chan est protégé !"; return}
  1181.     if {[verify:b $::fichier(defmode) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 Chan déjà existant !"; return}
  1182.     ajouter:donnee $::fichier(defmode) $chan $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"] $mode
  1183.         putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Adddefmode :\002 Mode ajouté !"
  1184.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) MODE $chan $mode"
  1185.     }
  1186.     if {[string equal -nocase $cmd deldefmode]} {
  1187.     set chan [lindex $arg 4]
  1188.     if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudog) defmode <#chan>"; return}
  1189.     if {![verify:b $::fichier(defmode) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Erreur :\002 Chan inexistant !"; return}
  1190.     effacer:donnee $::fichier(defmode) 0 $chan
  1191.     putdcc $::pooshy(idx) ":$::pooshy(pseudog) NOTICE $nick :\002Deldefmode :\002 Mode supprimé !"
  1192.     }
  1193.     }
  1194.  
  1195. #################
  1196. #  POOSHY-IOTA  #
  1197. #################
  1198.  
  1199. if {[string equal -nocase $nickto $::pooshy(pseudoi)]} {
  1200.     if {![verify:a $::fichier(alist) 2 $nick]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Vous n'êtes pas authentifier"; return}
  1201.     if {![islevel $nick O]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Vous n'avez pas access à cette socket !"; return}
  1202.     if {[string equal -nocase $cmd help]} {
  1203.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :------ \002 Iota (SERVICE OPERATOR !BOT!) \002 ------"
  1204.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002 OP \002 \002 DEOP \002 \002 VOICE \002 \002 DEVOICE \002"
  1205.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002 BOT \002 \002 ADDBOT \002 \002 DELBOT \002"
  1206.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002 OPMYBOT \002 \002 ADDOPMYBOT \002 \002 DELOPMYBOT \002"
  1207.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002 BLACKLISTBOT \002 \002 ADDBLACKLISTBOT \002 \002 DELBLACKLISTBOT \002"
  1208.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002 BLACKLISTOPMYBOT \002 \002 ADDBLACKLISTOPMYBOT \002 \002 DELBLACKLISTOPMYBOT \002"
  1209.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002 ISREG \002 \002 GLINENOREG \002 \002 REOP \002"
  1210.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :------ \002 Fin \002 ------"
  1211.     }
  1212.     if {[string equal -nocase $cmd op]} {
  1213.     putspeed "MODE $::::pooshy(principal) +o $nick"
  1214.     }
  1215.     if {[string equal -nocase $cmd deop]} {
  1216.     putspeed "MODE $::pooshy(principal) -o $nick"
  1217.     }
  1218.     if {[string equal -nocase $cmd voice]} {
  1219.     putspeed "MODE $::pooshy(principal) +v $nick"
  1220.     }
  1221.     if {[string equal -nocase $cmd devoice]} {
  1222.     putspeed "MODE $::pooshy(principal) -v $nick"
  1223.     }
  1224.     if {[string equal -nocase $cmd bot]} {
  1225.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :---\002 LISTE DES BOTS ENREGISTRÉS \002---";
  1226.     set liste [open $::fichier(bot) r]
  1227.     set num 0
  1228.     while {![eof $liste]} {
  1229.     gets $liste a
  1230.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :(\002$num\002) [lindex $a 0] (Owner du robot: [lindex $a 1] Adresse email: [lindex $a 2]) ajouter par [lindex $a 3] le [lindex $a 4]."}
  1231.     }
  1232.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :Aucun enregistrement." }
  1233.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  1234.     close $liste
  1235.     }
  1236.     if {[string equal -nocase $cmd addbot]} {
  1237.     set pseudo [lindex $arg 4]
  1238.     set owner [lindex $arg 5]
  1239.     set email [lindex $arg 6]
  1240.     if {$pseudo eq "" || $owner eq "" || $email eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoi) addbot <pseudo du robot> <owner du robot> <email de l'owner>"; return}
  1241.     if {[verify:b $::fichier(socket) 0 $pseudo]||[string equal -nocase $pseudo $::botnick]||[string equal -nocase $pseudo $::pooshy(pseudoa)]||[string equal -nocase $nick $::pooshy(pseudob)]||[string equal -nocase $pseudo $::pooshy(pseudor)]||[string equal -nocase $pseudo $::pooshy(pseudos)]||[string equal -nocase $pseudo $::pooshy(pseudoh)]||[string equal -nocase $pseudo $::pooshy(pseudog)]||[string equal -nocase $pseudo $::pooshy(pseudod)]||[string equal -nocase $pseudo $::pooshy(pseudoe)]||[string equal -nocase $pseudo $::pooshy(pseudoo)]||[string equal -nocase $pseudo $::pooshy(pseudoi)]||[string equal -nocase $pseudo $::pooshy(pseudou)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Ce pseudo est protégé !"; return}
  1242.     if {[verify:b $::fichier(blacklistbot) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Robot blacklisté !"; return}
  1243.     if {[verify:b $::fichier(bot) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Bot déjà existant !"; return}
  1244.     ajouter:donnee $::fichier(bot) $pseudo $owner $email $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"]
  1245.         putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Addbot :\002 Robot ajouté !"
  1246.     }
  1247.     if {[string equal -nocase $cmd delbot]} {
  1248.     set pseudo [lindex $arg 4]
  1249.     if {$pseudo eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoi) delbot <pseudo>"; return}
  1250.     if {![verify:b $::fichier(bot) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Robot inexistant !"; return}
  1251.     effacer:donnee $::fichier(bot) 0 $pseudo
  1252.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Delbot :\002 Robot supprimé !"
  1253.     }
  1254.     if {[string equal -nocase $cmd opmybot]} {
  1255.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :---\002 LISTE DES OPMYBOTS \002---";
  1256.     set liste [open $::fichier(opmybot) r]
  1257.     set num 0
  1258.     while {![eof $liste]} {
  1259.     gets $liste a
  1260.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :(\002$num\002) [lindex $a 0] (Chan: [lindex $a 1] Pass: [lindex $a 2]) ajouter par [lindex $a 3] le [lindex $a 4]."}
  1261.     }
  1262.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :Aucun enregistrement." }
  1263.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  1264.     close $liste
  1265.     }
  1266.     if {[string equal -nocase $cmd addopmybot]} {
  1267.     set pseudo [lindex $arg 4]
  1268.     set chan [lindex $arg 5]
  1269.     set pass [lindex $arg 6]
  1270.     if {$pseudo eq "" || [string index $chan 0] ne "#" || $pass eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoi) addopmybot <pseudo du robot> <#chan> <pass>"; return}
  1271.     if {[string equal -nocase $chan $::pooshy(chan)]||[string equal -nocase $chan $::pooshy(principal)]||[string equal -nocase $chan $::pooshy(ops)]||[string equal -nocase $chan $::pooshy(ircop)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Ce chan est protégé !"; return}
  1272.     if {[verify:b $::fichier(blacklistopmybot) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Robot blacklisté !"; return}
  1273.     if {![verify:b $::fichier(bot) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Robot inexistant !"; return}
  1274.     if {[verify:b $::fichier(opmybot) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Opmybot déjà existant pour ce robot !"; return}
  1275.     if {[verify:b $::fichier(opmybot) 1 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Chan possédant déjà un opmybot !"; return}
  1276.     ajouter:donnee $::fichier(opmybot) $pseudo $chan $pass $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"]
  1277.         putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Addopmybot :\002 Opmybot ajouté !"
  1278.     }
  1279.     if {[string equal -nocase $cmd delopmybot]} {
  1280.     set pseudo [lindex $arg 4]
  1281.     if {$pseudo eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoi) delopmybot <pseudo>"; return}
  1282.     if {![verify:b $::fichier(opmybot) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Robot inexistant !"; return}
  1283.     effacer:donnee $::fichier(opmybot) 0 $pseudo
  1284.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Delopmybot :\002 Opmybot supprimé !"
  1285.     }
  1286.     if {[string equal -nocase $cmd blacklistbot]} {
  1287.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :---\002 LISTE DE LA BLACKLISTBOT \002---";
  1288.     set liste [open $::fichier(blacklistbot) r]
  1289.     set num 0
  1290.     while {![eof $liste]} {
  1291.     gets $liste a
  1292.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :(\002$num\002) [lindex $a 0] (raison : [join [lrange [split $a] 5 end]]) ajouter par [lindex $a 1] le [lindex $a 2]."}
  1293.     }
  1294.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :Aucun enregistrement." }
  1295.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  1296.     close $liste
  1297.     }
  1298.     if {[string equal -nocase $cmd addblacklistbot]} {
  1299.     set pseudo [lindex $arg 4]
  1300.     set raison [join [lrange [split $arg] 5 end]]
  1301.     if {$pseudo eq ""||$raison eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoi) addblacklistbot <pseudo du robot> <raison>"; return}
  1302.     if {[verify:b $::fichier(socket) 0 $pseudo]||[string equal -nocase $pseudo $::botnick]||[string equal -nocase $pseudo $::pooshy(pseudoa)]||[string equal -nocase $nick $::pooshy(pseudob)]||[string equal -nocase $pseudo $::pooshy(pseudor)]||[string equal -nocase $pseudo $::pooshy(pseudos)]||[string equal -nocase $pseudo $::pooshy(pseudoh)]||[string equal -nocase $pseudo $::pooshy(pseudog)]||[string equal -nocase $pseudo $::pooshy(pseudod)]||[string equal -nocase $pseudo $::pooshy(pseudoe)]||[string equal -nocase $pseudo $::pooshy(pseudoo)]||[string equal -nocase $pseudo $::pooshy(pseudoi)]||[string equal -nocase $pseudo $::pooshy(pseudou)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Ce pseudo est protégé !"; return}
  1303.     if {[verify:b $::fichier(blacklistbot) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Bot déjà blacklisté !"; return}
  1304.     ajouter:donnee $::fichier(blacklistbot) $pseudo $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"] $raison
  1305.         putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Addblacklistbot :\002 Robot ajouté !"
  1306.     }
  1307.     if {[string equal -nocase $cmd delblacklistbot]} {
  1308.     set pseudo [lindex $arg 4]
  1309.     if {$pseudo eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoi) delblacklistbot <pseudo>"; return}
  1310.     if {![verify:b $::fichier(blacklistbot) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Robot inexistant !"; return}
  1311.     effacer:donnee $::fichier(blacklistbot) 0 $pseudo
  1312.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Delblacklistbot :\002 Robot supprimé !"
  1313.     }
  1314.     if {[string equal -nocase $cmd blacklistopmybot]} {
  1315.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :---\002 LISTE DE LA BLACKLISTOPMYBOT \002---";
  1316.     set liste [open $::fichier(blacklistopmybot) r]
  1317.     set num 0
  1318.     while {![eof $liste]} {
  1319.     gets $liste a
  1320.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :(\002$num\002) [lindex $a 0] (raison : [join [lrange [split $a] 5 end]]) ajouter par [lindex $a 1] le [lindex $a 2]."}
  1321.     }
  1322.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :Aucun enregistrement." }
  1323.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  1324.     close $liste
  1325.     }
  1326.     if {[string equal -nocase $cmd addblacklistopmybot]} {
  1327.     set pseudo [lindex $arg 4]
  1328.     set raison [join [lrange [split $arg] 5 end]]
  1329.     if {$pseudo eq ""||$raison eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoi) addblacklistopmybot <pseudo du robot> <raison>"; return}
  1330.     if {[verify:b $::fichier(socket) 0 $pseudo]||[string equal -nocase $pseudo $::botnick]||[string equal -nocase $pseudo $::pooshy(pseudoa)]||[string equal -nocase $nick $::pooshy(pseudob)]||[string equal -nocase $pseudo $::pooshy(pseudor)]||[string equal -nocase $pseudo $::pooshy(pseudos)]||[string equal -nocase $pseudo $::pooshy(pseudoh)]||[string equal -nocase $pseudo $::pooshy(pseudog)]||[string equal -nocase $pseudo $::pooshy(pseudod)]||[string equal -nocase $pseudo $::pooshy(pseudoe)]||[string equal -nocase $pseudo $::pooshy(pseudoo)]||[string equal -nocase $pseudo $::pooshy(pseudoi)]||[string equal -nocase $pseudo $::pooshy(pseudou)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Ce pseudo est protégé !"; return}
  1331.     if {[verify:b $::fichier(blacklistopmybot) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Bot déjà blacklisté !"; return}
  1332.     ajouter:donnee $::fichier(blacklistopmybot) $pseudo $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"] $raison
  1333.         putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Addblacklistopmybot :\002 Robot ajouté !"
  1334.     }
  1335.     if {[string equal -nocase $cmd delblacklistopmybot]} {
  1336.     set pseudo [lindex $arg 4]
  1337.     if {$pseudo eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoi) delblacklistopmybot <pseudo>"; return}
  1338.     if {![verify:b $::fichier(blacklistopmybot) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Robot inexistant !"; return}
  1339.     effacer:donnee $::fichier(blacklistopmybot) 0 $pseudo
  1340.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Delblacklistopmybot :\002 Robot supprimé !"
  1341.     }
  1342.     if {[string equal -nocase $cmd isreg]} {
  1343.     set pseudo [lindex $arg 4]
  1344.     if {$pseudo eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoi) isreg <pseudo>"; return}
  1345.     if {![verify:b $::fichier(bot) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Ce robot n'est pas reg !"; return}
  1346.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Isreg :\002 Le robot est reg !"
  1347.     }
  1348.     if {[string equal -nocase $cmd glinenoreg]} {
  1349.     set pseudo [lindex $arg 4]
  1350.     if {$pseudo eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoi) isreg <pseudo du robot>"; return}
  1351.     if {[verify:b $::fichier(socket) 0 $pseudo]||[string equal -nocase $pseudo $::botnick]||[string equal -nocase $pseudo $::pooshy(pseudoa)]||[string equal -nocase $nick $::pooshy(pseudob)]||[string equal -nocase $pseudo $::pooshy(pseudor)]||[string equal -nocase $pseudo $::pooshy(pseudos)]||[string equal -nocase $pseudo $::pooshy(pseudoh)]||[string equal -nocase $pseudo $::pooshy(pseudog)]||[string equal -nocase $pseudo $::pooshy(pseudod)]||[string equal -nocase $pseudo $::pooshy(pseudoe)]||[string equal -nocase $pseudo $::pooshy(pseudoo)]||[string equal -nocase $pseudo $::pooshy(pseudoi)]||[string equal -nocase $pseudo $::pooshy(pseudou)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Ce pseudo est protégé !"; return}
  1352.     if {[verify:b $::fichier(bot) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Ce robot est reg !"; return}
  1353.     set ::pooshy(cmd) "GLINE"
  1354.     set ::pooshy(nick) $::pooshy(pseudoi)
  1355.     set ::pooshy(hand) $::pooshy(pseudoi)
  1356.     set ::pooshy(raison) $::raison(noreg)
  1357.     set ::pooshy(temp) $::temp(noreg)
  1358.     set ::pooshy(expire) "expire le [clock format [expr $::pooshy(temp) + [clock second]] -format "%d/%m/%Y à %H:%M (GMT+1)"]"
  1359.     set ::pooshy(heure) "[clock format [clock seconds] -format "%Y/%m/%d %H:%M"]"
  1360.     putdcc $::pooshy(idx) ":$::pooshy(pseudoi) WHOIS $pseudo"
  1361.     }
  1362.     if {[string equal -nocase $cmd reop]} {
  1363.     set pseudo [lindex $arg 4]
  1364.     if {$pseudo eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoi) reop <pseudo du robot>"; return}
  1365.     if {![verify:b $::fichier(opmybot) 0 $pseudo]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoi) NOTICE $nick :\002Erreur :\002 Ce robot n'a aucun opmybot !"; return}
  1366.     set liste [open $::fichier(opmybot) r]
  1367.     while {![eof $liste]} {
  1368.     gets $liste a
  1369.     if {[string equal -nocase [lindex $a 0] $pseudo]} {set chan [lindex $a 1]}
  1370.     }
  1371.     putdcc $::pooshy(idx) ":$::pooshy(pseudor) MODE $chan +o $pseudo"
  1372.     putdcc $::pooshy(idx) ":$::pooshy(pseudor) PRIVMSG $::pooshy(principal) :•Pooshy ReOp• Asked by \037$nick\037 => \2\0033•\2\003Accepté\2\0033•\2\003 $pseudo sur $chan"
  1373.     putdcc $::pooshy(idx) ":$::pooshy(pseudor) PRIVMSG $chan :•Pooshy Service• °ReOp° => \2$pseudo\2 sur $chan"
  1374.     }
  1375.     }
  1376.  
  1377. ####################
  1378. #  POOSHY-OMICRON  #
  1379. ####################
  1380.  
  1381. if {[string equal -nocase $nickto $::pooshy(pseudoo)]} {
  1382.     if {![verify:a $::fichier(alist) 2 $nick]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Vous n'êtes pas authentifier"; return}
  1383.     if {![islevel $nick I]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Vous n'avez pas access à cette socket !"; return}
  1384.     if {[string equal -nocase $cmd help]} {
  1385.     putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :------ \002 Omicron (SERVICE IRCOPERATOR) \002 ------"
  1386.     putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002 OP \002 \002 DEOP \002 \002 VOICE \002 \002 DEVOICE \002"
  1387.     putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002 KICK \002 \002 BAN \002  \002 BANLIST \002 \002 UNBAN \002 \002 UNBANALL \002 \002 KICKBAN \002 \002 KICKALL \002 \002 BANALL \002 \002 KICKBANALL \002"
  1388.     putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002 KILL \002 \002 KLINE \002  \002 KLINELIST \002 \002 GLINE \002  \002 GLINELIST \002 \002 KILLALL \002 \002 KLINEALL \002 \002 GLINEALL \002"
  1389.     putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002 MODE \002 \002 TOPIC \002 \002 XWHOIS \002 \002 XWHOWAS \002"
  1390.     putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002 SAJOIN \002 \002 SAPART \002 \002 RNICK \002"
  1391.     putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :------ \002 Fin \002 ------"
  1392.     }
  1393.     if {[string equal -nocase $cmd op]} {
  1394.         set chan [lindex $arg 4]
  1395.         set pseudo [lindex $arg 5]
  1396.         if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) op <#chan> <nick>"; return}
  1397.         if {$pseudo eq ""} {set pseudo $nick}
  1398.         if {[string equal -nocase $pseudo $::pooshy(pseudoo)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Doucement !!"; return}
  1399.         set ::pooshy(nick) $nick
  1400.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan +o $pseudo"
  1401.     }
  1402.     if {[string equal -nocase $cmd opall]} {
  1403.         set chan [lindex $arg 4]
  1404.         if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) opall <#chan>"; return}
  1405.         set ::pooshy(cmd) "OPALL"
  1406.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) WHO $chan"
  1407.     }
  1408.     if {[string equal -nocase $cmd deop]} {
  1409.         set chan [lindex $arg 4]
  1410.         set pseudo [lindex $arg 5]
  1411.         if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) deop <#chan> <nick>"; return}
  1412.         if {$pseudo eq ""} {set pseudo $nick}
  1413.         set ::pooshy(nick) $nick
  1414.         if {[string equal -nocase $pseudo $::pooshy(pseudoo)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Doucement !!"; return}
  1415.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan -o $pseudo"
  1416.     }
  1417.     if {[string equal -nocase $cmd deopall]} {
  1418.         set chan [lindex $arg 4]
  1419.         if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) deopall <#chan>"; return}
  1420.         set ::pooshy(cmd) "DEOPALL"
  1421.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) WHO $chan"
  1422.     }
  1423.     if {[string equal -nocase $cmd voice]} {
  1424.         set chan [lindex $arg 4]
  1425.         set pseudo [lindex $arg 5]
  1426.         if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) voice <#chan> <nick>"; return}
  1427.         if {$pseudo eq ""} {set pseudo $nick}
  1428.         if {[string equal -nocase $pseudo $::pooshy(pseudoo)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Doucement !!"; return}
  1429.         set ::pooshy(nick) $nick
  1430.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan +v $pseudo"
  1431.     }
  1432.     if {[string equal -nocase $cmd voiceall]} {
  1433.         set chan [lindex $arg 4]
  1434.         if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) voiceall <#chan>"; return}
  1435.         set ::pooshy(cmd) "VOICEALL"
  1436.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) WHO $chan"
  1437.     }
  1438.     if {[string equal -nocase $cmd devoice]} {
  1439.         set chan [lindex $arg 4]
  1440.         set pseudo [lindex $arg 5]
  1441.         if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) devoice <#chan> <nick>"; return}
  1442.         if {$pseudo eq ""} {set pseudo $nick}
  1443.         if {[string equal -nocase $pseudo $::pooshy(pseudoo)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Doucement !!"; return}
  1444.         set ::pooshy(nick) $nick
  1445.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan -v $pseudo"
  1446.     }
  1447.     if {[string equal -nocase $cmd devoiceall]} {
  1448.         set chan [lindex $arg 4]
  1449.         if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) devoiceall <#chan>"; return}
  1450.         set ::pooshy(cmd) "DEVOICEALL"
  1451.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) WHO $chan"
  1452.     }
  1453.     if {[string equal -nocase $cmd invite]} {
  1454.         set chan [lindex $arg 4]
  1455.         set pseudo [lindex $arg 5]
  1456.         if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) invite <#chan> <nick>"; return}
  1457.         if {$pseudo eq ""} {set pseudo $nick}
  1458.         if {[string equal -nocase $pseudo $::pooshy(pseudoo)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Doucement !!"; return}
  1459.         set ::pooshy(nick) $nick
  1460.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) INVITE $pseudo $chan"
  1461.     }
  1462.     if {[string equal -nocase $cmd mode]} {
  1463.         set chan [lindex $arg 4]
  1464.         set mode [lindex $arg 5]
  1465.         set value [join [lrange [split $arg] 6 end]]
  1466.         if {$mode eq ""||[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) mode <#chan> <mode>"; return}
  1467.         if {$value eq ""} {set value ""}
  1468.         if {[string match *O* $mode ]} {if {$pooshy(level)<"1"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Votre level ne vous permet pas d'appliquer le mode O"; return}}
  1469.         if {[string match *A* $mode ]} {if {$pooshy(level)<"2"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Votre level ne vous permet pas d'appliquer le mode A"; return}}
  1470.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan $mode $value"
  1471.     }
  1472.     if {[string equal -nocase $cmd topic]} {
  1473.         set chan [lindex $arg 4]
  1474.         set texte [join [lrange [split $arg] 5 end]]
  1475.         if {$texte eq ""||[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) topic <#chan> <texte>"; return}
  1476.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) TOPIC $chan :$texte"
  1477.     }
  1478.     if {[string equal -nocase $cmd kick]} {
  1479.         set chan [lindex $arg 4]
  1480.         set pseudo [lindex $arg 5]
  1481.         set raison [join [lrange [split $arg] 6 end]]
  1482.         if {$pseudo eq ""||[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) kick <#chan> <pseudo> <raison>"; return}
  1483.         if {[verify:b $::fichier(socket) 0 $pseudo]||[string equal -nocase $pseudo $::botnick]||[string equal -nocase $pseudo $::pooshy(pseudoa)]||[string equal -nocase $nick $::pooshy(pseudob)]||[string equal -nocase $pseudo $::pooshy(pseudor)]||[string equal -nocase $pseudo $::pooshy(pseudos)]||[string equal -nocase $pseudo $::pooshy(pseudoh)]||[string equal -nocase $pseudo $::pooshy(pseudog)]||[string equal -nocase $pseudo $::pooshy(pseudod)]||[string equal -nocase $pseudo $::pooshy(pseudoe)]||[string equal -nocase $pseudo $::pooshy(pseudoo)]||[string equal -nocase $pseudo $::pooshy(pseudoi)]||[string equal -nocase $pseudo $::pooshy(pseudou)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Ce pseudo est protégé !"; return}
  1484.         if {$raison eq ""} {set raison $::raison(kick)}
  1485.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) KICK $chan $pseudo :$raison - $nick"
  1486.     }
  1487.     if {[string equal -nocase $cmd kickall]} {
  1488.         set chan [lindex $arg 4]
  1489.         set raison [join [lrange [split $arg] 5 end]]
  1490.         if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) kickall <#chan> <raison>"; return}
  1491.         if {$raison eq ""} {set raison $::raison(kick)}
  1492.         set ::pooshy(cmd) "KICKALL"
  1493.         set ::pooshy(hand) $nick
  1494.         set ::pooshy(raison) $raison
  1495.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) WHO $chan"
  1496.     }
  1497.     if {[string equal -nocase $cmd banlist]} {
  1498.         set chan [lindex $arg 4]
  1499.         if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) banlist <#chan>"; return}
  1500.         set ::pooshy(cmd) "BANLIST"
  1501.         set ::pooshy(num) "0"
  1502.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $pooshy(nick) :---\002 LISTE DE BANLIST \002---";
  1503.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan +b"
  1504.     }
  1505.     if {[string equal -nocase $cmd ban]} {
  1506.         set chan [lindex $arg 4]
  1507.         set host [lindex $arg 5]
  1508.         if {$host eq ""||[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) ban <#chan> <host>"; return}
  1509.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan +b $host"
  1510.     }
  1511.     if {[string equal -nocase $cmd banall]} {
  1512.         set chan [lindex $arg 4]
  1513.         if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) banall <#chan>"; return}
  1514.         set ::pooshy(cmd) "BANALL"
  1515.         set ::pooshy(nick) $nick
  1516.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) WHO $chan"
  1517.     }
  1518.     if {[string equal -nocase $cmd unban]} {
  1519.         set chan [lindex $arg 4]
  1520.         set host [lindex $arg 5]
  1521.         if {$host eq ""||[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) unban <#chan> <host>"; return}
  1522.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan -b $host"
  1523.     }
  1524.     if {[string equal -nocase $cmd unbanall]} {
  1525.         set chan [lindex $arg 4]
  1526.         if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) unbanall <#chan>"; return}
  1527.         set ::pooshy(cmd) "UNBANALL"
  1528.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan b"
  1529.     }
  1530.     if {[string equal -nocase $cmd kickban]} {
  1531.         set chan [lindex $arg 4]
  1532.         set pseudo [lindex $arg 5]
  1533.         set raison [join [lrange [split $arg] 6 end]]
  1534.         if {$pseudo eq ""||[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) kickban <#chan> <pseudo> <raison>"; return}
  1535.         if {[verify:b $::fichier(socket) 0 $pseudo]||[string equal -nocase $pseudo $::botnick]||[string equal -nocase $pseudo $::pooshy(pseudoa)]||[string equal -nocase $nick $::pooshy(pseudob)]||[string equal -nocase $pseudo $::pooshy(pseudor)]||[string equal -nocase $pseudo $::pooshy(pseudos)]||[string equal -nocase $pseudo $::pooshy(pseudoh)]||[string equal -nocase $pseudo $::pooshy(pseudog)]||[string equal -nocase $pseudo $::pooshy(pseudod)]||[string equal -nocase $pseudo $::pooshy(pseudoe)]||[string equal -nocase $pseudo $::pooshy(pseudoo)]||[string equal -nocase $pseudo $::pooshy(pseudoi)]||[string equal -nocase $pseudo $::pooshy(pseudou)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Ce pseudo est protégé !"; return}
  1536.         if {$raison eq ""} {set raison $::raison(kick)}
  1537.         set ::pooshy(cmd) "KICKBAN"
  1538.         set ::pooshy(chan) "$chan"
  1539.         set ::pooshy(raison) "$raison"
  1540.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) WHOIS $pseudo"
  1541.     }
  1542.     if {[string equal -nocase $cmd kickbanall]} {
  1543.         set chan [lindex $arg 4]
  1544.         set raison [join [lrange [split $arg] 5 end]]
  1545.         if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) kickbanall <#chan> <raison>"; return}
  1546.         if {$raison eq ""} {set raison $::raison(kick)}
  1547.         set ::pooshy(nick) "$nick"
  1548.         set ::pooshy(cmd) "KICKBANALL"
  1549.         set ::pooshy(chan) "$chan"
  1550.         set ::pooshy(hand) $nick
  1551.         set ::pooshy(raison) "$raison"
  1552.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) WHO $chan"
  1553.     }
  1554.     if {[string equal -nocase $cmd kill]} {
  1555.         set pseudo [lindex $arg 4]
  1556.         set raison [join [lrange [split $arg] 5 end]]
  1557.         if {$pseudo eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) kill <pseudo> <raison>"; return}
  1558.         if {$raison eq ""} {set raison $::raison(kill)}
  1559.         if {[verify:b $::fichier(socket) 0 $pseudo]||[string equal -nocase $pseudo $::botnick]||[string equal -nocase $pseudo $::pooshy(pseudoa)]||[string equal -nocase $nick $::pooshy(pseudob)]||[string equal -nocase $pseudo $::pooshy(pseudor)]||[string equal -nocase $pseudo $::pooshy(pseudos)]||[string equal -nocase $pseudo $::pooshy(pseudoh)]||[string equal -nocase $pseudo $::pooshy(pseudog)]||[string equal -nocase $pseudo $::pooshy(pseudod)]||[string equal -nocase $pseudo $::pooshy(pseudoe)]||[string equal -nocase $pseudo $::pooshy(pseudoo)]||[string equal -nocase $pseudo $::pooshy(pseudoi)]||[string equal -nocase $pseudo $::pooshy(pseudou)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Ce pseudo est protégé !"; return}
  1560.         set ::pooshy(nick) $nick
  1561.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) KILL $pseudo $::pooshy(pseudoo) ($raison) - $nick"
  1562.     }
  1563.     if {[string equal -nocase $cmd killall]} {
  1564.         set chan [lindex $arg 4]
  1565.         set raison [join [lrange [split $arg] 5 end]]
  1566.         if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) killall <#chan> <raison>"; return}
  1567.         if {$raison eq ""} {set raison $::raison(kill)}
  1568.         set ::pooshy(cmd) "KILLALL"
  1569.         set ::pooshy(hand) $nick
  1570.         set ::pooshy(raison) $raison
  1571.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) WHO $chan"
  1572.     }
  1573.     if {[string equal -nocase $cmd klinelist]} {
  1574.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :---\002 LISTE DE LA KLINELIST \002---";
  1575.         set ::pooshy(cmd) "KLINELIST"
  1576.         set ::pooshy(nick) $nick
  1577.         set ::pooshy(num) "0"
  1578.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo)  STATS K"
  1579.     }
  1580.     if {[string equal -nocase $cmd kline]} {
  1581.         set pseudo [lindex $arg 4]
  1582.         set temp [lindex $arg 5]
  1583.         set raison [join [lrange [split $arg] 6 end]]
  1584.         if {$pseudo eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) kline <pseudo> <tempenseconde> <raison>"; return}
  1585.         if {[verify:b $::fichier(socket) 0 $pseudo]||[string equal -nocase $pseudo $::botnick]||[string equal -nocase $pseudo $::pooshy(pseudoa)]||[string equal -nocase $nick $::pooshy(pseudob)]||[string equal -nocase $pseudo $::pooshy(pseudor)]||[string equal -nocase $pseudo $::pooshy(pseudos)]||[string equal -nocase $pseudo $::pooshy(pseudoh)]||[string equal -nocase $pseudo $::pooshy(pseudog)]||[string equal -nocase $pseudo $::pooshy(pseudod)]||[string equal -nocase $pseudo $::pooshy(pseudoe)]||[string equal -nocase $pseudo $::pooshy(pseudoo)]||[string equal -nocase $pseudo $::pooshy(pseudoi)]||[string equal -nocase $pseudo $::pooshy(pseudou)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Ce pseudo est protégé !"; return}
  1586.         if {$raison eq ""} {set raison $::raison(kline)}
  1587.         if {$temp eq ""} {set temp $::temp(kline)}
  1588.         set ::pooshy(cmd) "KLINE"
  1589.         set ::pooshy(hand) $nick
  1590.         set ::pooshy(raison) $raison
  1591.         set ::pooshy(temp) $temp
  1592.         set ::pooshy(expire) "expire le [clock format [expr $temp + [clock second]] -format "%d/%m/%Y à %H:%M (GMT+1)"]"
  1593.         set ::pooshy(heure) "[clock format [clock seconds] -format "%Y/%m/%d %H:%M"]"
  1594.         set ::pooshy(nick) $::pooshy(pseudoo)
  1595.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) WHOIS $pseudo"
  1596.     }
  1597.     if {[string equal -nocase $cmd unkline]} {
  1598.         set host [lindex $arg 4]
  1599.         if {$host eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) unkline <host>"; return}
  1600.         putdcc $::pooshy(idx) ":$::pooshy(link) TKL - k [lindex [split $host @] 0] [lindex [split $host @] 1] $::pooshy(pseudoo)"
  1601.     }
  1602.     if {[string equal -nocase $cmd glinelist]} {
  1603.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :---\002 LISTE DE LA GLINELIST \002---";
  1604.         set ::pooshy(cmd) "GLINELIST"
  1605.         set ::pooshy(num) "0"
  1606.         set ::pooshy(nick) $nick
  1607.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo)  STATS G"
  1608.     }
  1609.     if {[string equal -nocase $cmd gline]} {
  1610.         set pseudo [lindex $arg 4]
  1611.         set temp [lindex $arg 5]
  1612.         set raison [join [lrange [split $arg] 6 end]]
  1613.         if {$pseudo eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) gline <pseudo> <tempenseconde> <raison>"; return}
  1614.         if {[verify:b $::fichier(socket) 0 $pseudo]||[string equal -nocase $pseudo $::botnick]||[string equal -nocase $pseudo $::pooshy(pseudoa)]||[string equal -nocase $nick $::pooshy(pseudob)]||[string equal -nocase $pseudo $::pooshy(pseudor)]||[string equal -nocase $pseudo $::pooshy(pseudos)]||[string equal -nocase $pseudo $::pooshy(pseudoh)]||[string equal -nocase $pseudo $::pooshy(pseudog)]||[string equal -nocase $pseudo $::pooshy(pseudod)]||[string equal -nocase $pseudo $::pooshy(pseudoe)]||[string equal -nocase $pseudo $::pooshy(pseudoo)]||[string equal -nocase $pseudo $::pooshy(pseudoi)]||[string equal -nocase $pseudo $::pooshy(pseudou)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Ce pseudo est protégé !"; return}
  1615.         if {$raison eq ""} {set raison $::raison(gline)}
  1616.         if {$temp eq ""} {set temp $::temp(kline)}
  1617.         set ::pooshy(cmd) "GLINE"
  1618.         set ::pooshy(hand) $nick
  1619.         set ::pooshy(raison) $raison
  1620.         set ::pooshy(temp) $temp
  1621.         set ::pooshy(expire) "expire le [clock format [expr $temp + [clock second]] -format "%d/%m/%Y à %H:%M (GMT+1)"]"
  1622.         set ::pooshy(heure) "[clock format [clock seconds] -format "%Y/%m/%d %H:%M"]"
  1623.         set ::pooshy(nick) $::pooshy(pseudoo)
  1624.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) WHOIS $pseudo"
  1625.     }
  1626.     if {[string equal -nocase $cmd ungline]} {
  1627.         set host [lindex $arg 4]
  1628.         if {$host eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) ungline <host>"; return}
  1629.         putdcc $::pooshy(idx) ":$::pooshy(link) TKL - G [lindex [split $host @] 0] [lindex [split $host @] 1] $::pooshy(pseudoo)"
  1630.     }
  1631.     if {[string equal -nocase $cmd klineall]} {
  1632.         set chan [lindex $arg 4]
  1633.         set temp [lindex $arg 5]
  1634.         set raison [join [lrange [split $arg] 6 end]]
  1635.         if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) klineall <#chan> <tempenseconde> <raison>"; return}
  1636.         if {$raison eq ""} {set raison $::raison(kline)}
  1637.         if {$temp eq ""} {set temp $::temp(kline)}
  1638.         set ::pooshy(cmd) "KLINEALL"
  1639.         set ::pooshy(hand) $nick
  1640.         set ::pooshy(raison) $raison
  1641.         set ::pooshy(temp) $temp
  1642.         set ::pooshy(expire) "expire le [clock format [expr $temp + [clock second]] -format "%d/%m/%Y à %H:%M (GMT+1)"]"
  1643.         set ::pooshy(heure) "[clock format [clock seconds] -format "%Y/%m/%d %H:%M"]"
  1644.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) WHO $chan"
  1645.     }
  1646.     if {[string equal -nocase $cmd unklineall]} {
  1647.         set ::pooshy(cmd) "UNKLINEALL"
  1648.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) STATS K"
  1649.     }
  1650.     if {[string equal -nocase $cmd glineall]} {
  1651.         set chan [lindex $arg 4]
  1652.         set temp [lindex $arg 5]
  1653.         set raison [join [lrange [split $arg] 6 end]]
  1654.         if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) glineall <#chan> <tempenseconde> <raison>"; return}
  1655.         if {$raison eq ""} {set raison $::raison(gline)}
  1656.         if {$temp eq ""} {set temp $::temp(gline)}
  1657.         set ::pooshy(cmd) "GLINEALL"
  1658.         set ::pooshy(hand) $nick
  1659.         set ::pooshy(raison) $raison
  1660.         set ::pooshy(temp) $temp
  1661.         set ::pooshy(expire) "expire le [clock format [expr $temp + [clock second]] -format "%d/%m/%Y à %H:%M (GMT+1)"]"
  1662.         set ::pooshy(heure) "[clock format [clock seconds] -format "%Y/%m/%d %H:%M"]"
  1663.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) WHO $chan"
  1664.     }
  1665.     if {[string equal -nocase $cmd unglineall]} {
  1666.         set ::pooshy(cmd) "UNGLINEALL"
  1667.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) STATS G"
  1668.     }
  1669.     if {[string equal -nocase $cmd rnick]} {
  1670.         set ancien [lindex $arg 4]
  1671.         set nouveau [lindex $arg 5]
  1672.         set ::pooshy(nick) $nick
  1673.         if {$ancien eq ""||$nouveau eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) rnick <nick> <newnick>"; return}
  1674.         if {[string equal -nocase $ancien $::botnick]||[string equal -nocase $ancien $::pooshy(pseudoa)]||[string equal -nocase $ancien $::pooshy(pseudob)]||[string equal -nocase $ancien $::pooshy(pseudor)]||[string equal -nocase $ancien $::pooshy(pseudos)]||[string equal -nocase $ancien $::pooshy(pseudoh)]||[string equal -nocase $ancien $::pooshy(pseudog)]||[string equal -nocase $ancien $::pooshy(pseudod)]||[string equal -nocase $ancien $::pooshy(pseudoe)]||[string equal -nocase $ancien $::pooshy(pseudoo)]||[string equal -nocase $ancien $::pooshy(pseudoi)]||[string equal -nocase $ancien $::pooshy(pseudou)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Ce pseudo est protégé !"; return}
  1675.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo)  SVSNICK $ancien $nouveau 963086432"
  1676.     }
  1677.     if {[string equal -nocase $cmd sajoin]} {
  1678.         set chan [lindex $arg 4]
  1679.         set pseudo [lindex $arg 5]
  1680.         set ::pooshy(nick) $nick
  1681.         if {$chan eq ""||[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) sajoin <#chan> <pseudo>"; return}
  1682.         if {[verify:b $::fichier(socket) 0 $pseudo]||[string equal -nocase $pseudo $::botnick]||[string equal -nocase $pseudo $::pooshy(pseudoa)]||[string equal -nocase $nick $::pooshy(pseudob)]||[string equal -nocase $pseudo $::pooshy(pseudor)]||[string equal -nocase $pseudo $::pooshy(pseudos)]||[string equal -nocase $pseudo $::pooshy(pseudoh)]||[string equal -nocase $pseudo $::pooshy(pseudog)]||[string equal -nocase $pseudo $::pooshy(pseudod)]||[string equal -nocase $pseudo $::pooshy(pseudoe)]||[string equal -nocase $pseudo $::pooshy(pseudoo)]||[string equal -nocase $pseudo $::pooshy(pseudoi)]||[string equal -nocase $pseudo $::pooshy(pseudou)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Ce pseudo est protégé !"; return}
  1683.         if {$pseudo eq ""} {set pseudo $nick}
  1684.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo)  SAJOIN $pseudo $chan"
  1685.     }
  1686.     if {[string equal -nocase $cmd sapart]} {
  1687.         set chan [lindex $arg 4]
  1688.         set pseudo [lindex $arg 5]
  1689.         set ::pooshy(nick) $nick
  1690.         if {$chan eq ""||[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) sapart <#chan> <pseudo>"; return}
  1691.         if {[verify:b $::fichier(socket) 0 $pseudo]||[string equal -nocase $pseudo $::botnick]||[string equal -nocase $pseudo $::pooshy(pseudoa)]||[string equal -nocase $nick $::pooshy(pseudob)]||[string equal -nocase $pseudo $::pooshy(pseudor)]||[string equal -nocase $pseudo $::pooshy(pseudos)]||[string equal -nocase $pseudo $::pooshy(pseudoh)]||[string equal -nocase $pseudo $::pooshy(pseudog)]||[string equal -nocase $pseudo $::pooshy(pseudod)]||[string equal -nocase $pseudo $::pooshy(pseudoe)]||[string equal -nocase $pseudo $::pooshy(pseudoo)]||[string equal -nocase $pseudo $::pooshy(pseudoi)]||[string equal -nocase $pseudo $::pooshy(pseudou)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Ce pseudo est protégé !"; return}
  1692.         if {$pseudo eq ""} {set pseudo $nick}
  1693.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo)  SAPART $pseudo $chan"
  1694.     }
  1695.     if {[string equal -nocase $cmd notices]} {
  1696.         set texte [join [lrange [split $arg] 4 end]]
  1697.         if {$texte eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) notices <texte>"; return}
  1698.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo)  NOTICE $*.* :$texte"
  1699.     }
  1700.     if {[string equal -nocase $cmd xwhois]} {
  1701.         set pseudo [lindex $arg 4]
  1702.         if {$pseudo eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) xwhois <pseudo>"; return}
  1703.         if {[verify:b $::fichier(socket) 0 $pseudo]||[string equal -nocase $pseudo $::botnick]||[string equal -nocase $pseudo $::pooshy(pseudoa)]||[string equal -nocase $nick $::pooshy(pseudob)]||[string equal -nocase $pseudo $::pooshy(pseudor)]||[string equal -nocase $pseudo $::pooshy(pseudos)]||[string equal -nocase $pseudo $::pooshy(pseudoh)]||[string equal -nocase $pseudo $::pooshy(pseudog)]||[string equal -nocase $pseudo $::pooshy(pseudod)]||[string equal -nocase $pseudo $::pooshy(pseudoe)]||[string equal -nocase $pseudo $::pooshy(pseudoo)]||[string equal -nocase $pseudo $::pooshy(pseudoi)]||[string equal -nocase $pseudo $::pooshy(pseudou)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Ce pseudo est protégé !"; return}
  1704.         set ::pooshy(nick) $nick
  1705.         set ::pooshy(cmd) "XWHOIS"
  1706.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :---\002 XWHOIS DE $pseudo \002---";
  1707.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo)  WHOIS $pseudo"
  1708.     }
  1709.     if {[string equal -nocase $cmd xwhowas]} {
  1710.         set pseudo [lindex $arg 4]
  1711.         if {$pseudo eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudoo) xwhowas <pseudo>"; return}
  1712.         if {[verify:b $::fichier(socket) 0 $pseudo]||[string equal -nocase $pseudo $::botnick]||[string equal -nocase $pseudo $::pooshy(pseudoa)]||[string equal -nocase $nick $::pooshy(pseudob)]||[string equal -nocase $pseudo $::pooshy(pseudor)]||[string equal -nocase $pseudo $::pooshy(pseudos)]||[string equal -nocase $pseudo $::pooshy(pseudoh)]||[string equal -nocase $pseudo $::pooshy(pseudog)]||[string equal -nocase $pseudo $::pooshy(pseudod)]||[string equal -nocase $pseudo $::pooshy(pseudoe)]||[string equal -nocase $pseudo $::pooshy(pseudoo)]||[string equal -nocase $pseudo $::pooshy(pseudoi)]||[string equal -nocase $pseudo $::pooshy(pseudou)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :\002Erreur :\002 Ce pseudo est protégé !"; return}
  1713.         set ::pooshy(nick) $nick
  1714.         set ::pooshy(cmd) "XWHOWAS"
  1715.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $nick :---\002 XWHOWAS DE $pseudo \002---";
  1716.         putdcc $::pooshy(idx) ":$::pooshy(pseudoo)  WHOWAS $pseudo"
  1717.     }
  1718.     }
  1719.  
  1720. ####################
  1721. #  POOSHY-UPSILON  #
  1722. ####################
  1723.  
  1724. if {[string equal -nocase $nickto $::pooshy(pseudou)]} {
  1725.     if {![verify:a $::fichier(alist) 2 $nick]} {putdcc $::pooshy(idx) ":$::pooshy(pseudod) NOTICE $nick :\002Erreur :\002 Vous n'êtes pas authentifier"; return}
  1726.     if {![islevel $nick A]} {putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Erreur :\002 Vous n'avez pas access à cette socket !"; return}
  1727.     if {[string equal -nocase $cmd help]} {
  1728.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :------ \002 Upsilon (SERVICE VERIFY CHANNEL) \002 ------"
  1729.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002 BADCHAN \002 \002 ADDBADCHAN \002 \002 DELBADCHAN"
  1730.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002 PROTECTCHAN \002 \002 ADDPROTECTCHAN \002 \002 DELPROTECTCHAN\002"
  1731.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002 CLOSE \002 \002 ADDCLOSE \002 \002 DELCLOSE \002"
  1732.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :------ \002 Fin \002 ------"
  1733.     }
  1734.     if {[string equal -nocase $cmd badchan]} {
  1735.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :---\002 LISTE DES CHANS BADCHAN \002---";
  1736.     set liste [open $::fichier(badchan) r]
  1737.     set num 0
  1738.     while {![eof $liste]} {
  1739.     gets $liste a
  1740.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :(\002$num\002) [lindex $a 0] ajouter par [lindex $a 1] le [lindex $a 2]."}
  1741.     }
  1742.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :Aucun enregistrement." }
  1743.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  1744.     close $liste
  1745.     }
  1746.     if {[string equal -nocase $cmd addbadchan]} {
  1747.     set chan [lindex $arg 4]
  1748.     if {$chan eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudou) addbadchan <forme>"; return}
  1749.     if {[verify:b $::fichier(badchan) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Erreur :\002 Forme déjà existante !"; return}
  1750.     ajouter:donnee $::fichier(badchan) $chan $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"]
  1751.         putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Addbadchan :\002 Forme ajoutée !"
  1752.     }
  1753.     if {[string equal -nocase $cmd delbadchan]} {
  1754.     set chan [lindex $arg 4]
  1755.     if {$chan eq ""} {putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudou) delbadchan <forme>"; return}
  1756.     if {![verify:b $::fichier(badchan) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Erreur :\002 Forme inexistante !"; return}
  1757.     effacer:donnee $::fichier(badchan) 0 $chan
  1758.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Delbadchan :\002 Forme supprimé !"
  1759.     }
  1760.     if {[string equal -nocase $cmd protectchan]} {
  1761.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :---\002 LISTE DES CHANS PROTECTCHAN \002---";
  1762.     set liste [open $::fichier(protectchan) r]
  1763.     set num 0
  1764.     while {![eof $liste]} {
  1765.     gets $liste a
  1766.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :(\002$num\002) [lindex $a 0] ajouter par [lindex $a 1] le [lindex $a 2]."}
  1767.     }
  1768.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :Aucun enregistrement." }
  1769.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  1770.     close $liste
  1771.     }
  1772.     if {[string equal -nocase $cmd addprotectchan]} {
  1773.     set chan [lindex $arg 4]
  1774.     if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudou) addprotectchan <#chan>"; return}
  1775.     if {[verify:b $::fichier(protectchan) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Erreur :\002 Chan déjà existant !"; return}
  1776.     ajouter:donnee $::fichier(protectchan) $chan $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"]
  1777.         putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Addprotectchan :\002 Chan ajoutée !"
  1778.     }
  1779.     if {[string equal -nocase $cmd delprotectchan]} {
  1780.     set chan [lindex $arg 4]
  1781.     if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudou) delprotectchan <#chan>"; return}
  1782.     if {![verify:b $::fichier(protectchan) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Erreur :\002 Chan inexistant !"; return}
  1783.     effacer:donnee $::fichier(protectchan) 0 $chan
  1784.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Delprotectchan :\002 Chan supprimé !"
  1785.     }
  1786.     if {[string equal -nocase $cmd close]} {
  1787.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :---\002 LISTE DES CHANS CLOSE \002---";
  1788.     set liste [open $::fichier(close) r]
  1789.     set num 0
  1790.     while {![eof $liste]} {
  1791.     gets $liste a
  1792.     if {$a ne ""} {incr num 1;putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :(\002$num\002) [lindex $a 0] ajouter par [lindex $a 1] le [lindex $a 2]."}
  1793.     }
  1794.     if {$num eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :Aucun enregistrement." }
  1795.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :---\002 FIN DE LA LISTE \002--- Total (\002$num\002)";
  1796.     close $liste
  1797.     }
  1798.     if {[string equal -nocase $cmd addclose]} {
  1799.     set chan [lindex $arg 4]
  1800.     if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudou) addclose <#chan>"; return}
  1801.     if {[string equal -nocase $chan $::pooshy(chan)]||[string equal -nocase $chan $::pooshy(principal)]||[string equal -nocase $chan $::pooshy(ops)]||[string equal -nocase $chan $::pooshy(ircop)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoa) NOTICE $nick :\002Erreur :\002 Ce chan est protégé !"; return}
  1802.     if {[verify:b $::fichier(close) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Erreur :\002 Chan déjà existant !"; return}
  1803.     ajouter:donnee $::fichier(close) $chan $nick [clock format [clock seconds] -format "%d/%m/%Y à %Hh%M"]
  1804.         putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Addclose :\002 Chan ajoutée !"
  1805.     set ::pooshy(cmd) CLOSE
  1806.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) JOIN $chan"
  1807.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) MODE $chan +ntis+o $::pooshy(pseudou)"
  1808.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) TOPIC $chan :Salon fermé !"
  1809.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) WHO $chan"
  1810.     }
  1811.     }
  1812.     if {[string equal -nocase $cmd delclose]} {
  1813.     set chan [lindex $arg 4]
  1814.     if {[string index $chan 0] ne "#"} {putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Erreur :\002 /msg $::pooshy(pseudou) delclose <#chan>"; return}
  1815.     if {![verify:b $::fichier(close) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Erreur :\002 Chan inexistant !"; return}
  1816.     effacer:donnee $::fichier(close) 0 $chan
  1817.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) NOTICE $nick :\002Delclose :\002 Chan supprimé !"
  1818.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) TOPIC $chan :Bienvenue sur $chan "
  1819.     putdcc $::pooshy(idx) ":$::pooshy(pseudou) PART $chan"
  1820.     }
  1821.  
  1822. ############
  1823. # ANTISPAM #
  1824. ############
  1825.  
  1826.     if {[verify:b $::fichier(socket) 0 $nickto]} {
  1827.     set texte [join [lrange [split $arg] 3 end]]
  1828.     if {[verify:a $::fichier(mot) 0 $texte]} {
  1829.     set ::pooshy(cmd) "GLINE"
  1830.     set ::pooshy(nick) $::pooshy(pseudod)
  1831.     set ::pooshy(hand) $::pooshy(pseudod)
  1832.     set ::pooshy(raison) $::raison(spam)
  1833.     set ::pooshy(temp) $::temp(spam)
  1834.     set ::pooshy(expire) "expire le [clock format [expr $::pooshy(temp) + [clock second]] -format "%d/%m/%Y à %H:%M (GMT+1)"]"
  1835.     set ::pooshy(heure) "[clock format [clock seconds] -format "%Y/%m/%d %H:%M"]"
  1836.     putdcc $::pooshy(idx) ":$::pooshy(pseudod) WHOIS $nick"
  1837.     }
  1838.     }
  1839.  
  1840.     if {[string match -nocase *#* $nickto]} {
  1841.     set texte [join [lrange [split $arg] 3 end]]
  1842.     if {[verify:a $::fichier(mot) 0 $texte]} {
  1843.     set ::pooshy(cmd) "GLINE"
  1844.     set ::pooshy(nick) $::pooshy(pseudod)
  1845.     set ::pooshy(hand) $::pooshy(pseudod)
  1846.     set ::pooshy(raison) $::raison(spam)
  1847.     set ::pooshy(temp) $::temp(spam)
  1848.     set ::pooshy(expire) "expire le [clock format [expr $::pooshy(temp) + [clock second]] -format "%d/%m/%Y à %H:%M (GMT+1)"]"
  1849.     set ::pooshy(heure) "[clock format [clock seconds] -format "%Y/%m/%d %H:%M"]"
  1850.     putdcc $::pooshy(idx) ":$::pooshy(pseudod) WHOIS $nick"
  1851.     }
  1852.     }
  1853. }
  1854. if {[lindex $arg 1] eq "INVITE"} {
  1855. if {![verify:b $::fichier(socket) 0 [lindex $arg 2]]} {return}
  1856. set nick [string trim [lindex $arg 0] :]
  1857. set chan [string trim [lindex $arg 3] :]
  1858. putdcc $::pooshy(idx) ":$::pooshy(pseudod) KILL $nick $::pooshy(pseudod) ($::raison(massinvite)) - $::pooshy(pseudod)"
  1859. putdcc $::pooshy(idx) ":$::pooshy(pseudod) TOPIC $chan : \002(! Massinvite i) $::raison(massinvite)"
  1860. }
  1861. if {[lindex $arg 1] eq "NOTICE"} {
  1862. if {![verify:b $::fichier(chansocket) 0 [lindex $arg 2]]} {return}
  1863. set nick [string trim [lindex $arg 0] :]
  1864. putdcc $::pooshy(idx) ":$::pooshy(pseudod) KILL $nick $::pooshy(pseudod) ($::raison(noticechan)) - $::pooshy(pseudod)"
  1865. }
  1866.  
  1867. if {[lindex $arg 1] eq "PING"} {
  1868. putdcc $idx "PONG [lindex $arg 1]"
  1869. return
  1870. }
  1871.  
  1872. if {[lindex $arg 0] eq "NICK"} {
  1873. antifloodlog
  1874. if {$::stoplog eq "1"} {return}
  1875. putdcc $::pooshy(idx) ":$::pooshy(pseudoe) PRIVMSG $::pooshy(chan) :(\002CONNEXION\002) [lindex $arg 1] ~ [lindex $arg 1]![lindex $arg 4]@[lindex $arg 5] ~"
  1876. if {[string equal -nocase [lindex $arg 1] $::botnick]} {return}
  1877. proxy:check [lindex $arg 5] [lindex $arg 1]
  1878. set ::pooshy(cmd) "VERIFY"
  1879. putdcc $::pooshy(idx) ":$::pooshy(pseudoa) WHOIS [lindex $arg 1]"
  1880. }
  1881.  
  1882. if {[lindex $arg 1] eq "NICK"} {
  1883. isnick [string trim [lindex $arg 0] :] [lindex $arg 2]
  1884. antifloodlog
  1885. if {$::stoplog eq "1"} {return}
  1886. putdcc $::pooshy(idx) ":$::pooshy(pseudoe) PRIVMSG $::pooshy(chan) :(\002NICK\002) [string trim [lindex $arg 0] :] ~> [lindex $arg 2]"
  1887. if {[verify:a $::fichier(nick) 0 [lindex $arg 2]]} {
  1888. putdcc $::pooshy(idx) ":$::pooshy(pseudob) KILL [lindex $arg 2] $::pooshy(pseudob) ($::raison(nick)) - $::pooshy(pseudob)"
  1889. }
  1890. }
  1891.  
  1892. if {[lindex $arg 1] eq "QUIT"} {
  1893. effacer:donnee $::fichier(alist) 2 [string trim [lindex $arg 0] :]
  1894. antifloodlog
  1895. if {$::stoplog eq "1"} {return}
  1896. putdcc $::pooshy(idx) ":$::pooshy(pseudoe) PRIVMSG $::pooshy(chan) :(\002QUIT\002) [string trim [lindex $arg 0] :]"
  1897. }
  1898.  
  1899. if {[lindex $arg 1] eq "MODE"} {antifloodlog;if {$::stoplog eq "1"} {return};putdcc $::pooshy(idx) ":$::pooshy(pseudoe) PRIVMSG $::pooshy(chan) :(\002MODE\002) [string trim [lindex $arg 0] :] ~> [join [lrange [split $arg] 1 end]]"
  1900. if {[verify:b $::fichier(defmode) 0 [lindex $arg 2]]} {
  1901. set liste [open $::fichier(defmode) r]
  1902. while {![eof $liste]} {
  1903. gets $liste a
  1904. if {[string equal -nocase [lindex $a 0] [lindex $arg 2]]} {set mode [join [lrange [split $a] 5 end]]}
  1905. }
  1906. putdcc $::pooshy(idx) ":$::pooshy(pseudog) MODE [lindex $arg 2] +$mode"
  1907. }
  1908. }
  1909.  
  1910. if {[lindex $arg 1] eq "TOPIC"} {
  1911. antifloodlog
  1912. if {$::stoplog eq "1"} {return}
  1913. putdcc $::pooshy(idx) ":$::pooshy(pseudoe) PRIVMSG $::pooshy(chan) :(\002TOPIC\002) [string trim [lindex $arg 0] :] ~ [lindex $arg 2] ~ ~> [string trim [join [lrange [split $arg] 3 end]] :]"
  1914. if {[verify:b $::fichier(deftopic) 0 [lindex $arg 2]]} {
  1915. set liste [open $::fichier(deftopic) r]
  1916. while {![eof $liste]} {
  1917. gets $liste a
  1918. if {[string equal -nocase [lindex $a 0] [lindex $arg 2]]} {set topic [join [lrange [split $a] 5 end]]}
  1919. }
  1920. putdcc $::pooshy(idx) ":$::pooshy(pseudog) TOPIC [lindex $arg 2] :$topic"
  1921. }
  1922. }
  1923.  
  1924. if {[lindex $arg 1] eq "KICK"} {antifloodlog;if {$::stoplog eq "1"} {return};putdcc $::pooshy(idx) ":$::pooshy(pseudoe) PRIVMSG $::pooshy(chan) :(\002KICK\002) [string trim [lindex $arg 0] :] ~> [join [lrange [split $arg] 1 end]]"}
  1925.  
  1926. if {[lindex $arg 1] eq "JOIN"} {
  1927. antifloodlog
  1928. if {$::stoplog eq "1"} {return}
  1929. putdcc $::pooshy(idx) ":$::pooshy(pseudoe) PRIVMSG $::pooshy(chan) :(\002JOIN\002) [string trim [lindex $arg 0] :] ~> [lindex $arg 2]"
  1930. foreach  chan [split [lindex $arg 2] ,] {
  1931. if {[string equal -nocase $chan $::pooshy(chan)]} {return}
  1932. if {[string equal -nocase $chan $::pooshy(ops)]} {return}
  1933. if {[string equal -nocase $chan $::pooshy(principal)]} {return}
  1934. if {[verify:b $::fichier(autovoice) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) MODE $chan +v [lindex $arg 0]"}
  1935. if {[verify:b $::fichier(autoop) 0 $chan]} {putdcc $::pooshy(idx) ":$::pooshy(pseudog) MODE $chan +o [lindex $arg 0]"}
  1936. if {[verify:a $::fichier(badchan) 0 $chan]} {
  1937. if {[verify:a $::fichier(protectchan) 0 $chan]} {return}
  1938. set ::pooshy(cmd) CLOSE
  1939. putdcc $::pooshy(idx) ":$::pooshy(pseudou) JOIN $chan"
  1940. putdcc $::pooshy(idx) ":$::pooshy(pseudou) MODE $chan +ntis+o $::pooshy(pseudou)"
  1941. putdcc $::pooshy(idx) ":$::pooshy(pseudou) TOPIC $chan :$::topic(badchan)"
  1942. putdcc $::pooshy(idx) ":$::pooshy(pseudou) WHO $chan"
  1943. timer $::temp(badclose) [list putdcc $::pooshy(idx) ":$::pooshy(pseudou) PART $chan"]
  1944. }
  1945. if {[verify:b $::fichier(close) 0 $chan]} {
  1946. set ::pooshy(cmd) CLOSE
  1947. putdcc $::pooshy(idx) ":$::pooshy(pseudou) JOIN $chan"
  1948. putdcc $::pooshy(idx) ":$::pooshy(pseudou) MODE $chan +ntis+o $::pooshy(pseudou)"
  1949. putdcc $::pooshy(idx) ":$::pooshy(pseudou) TOPIC $chan :$::topic(close)"
  1950. putdcc $::pooshy(idx) ":$::pooshy(pseudou) WHO $chan"
  1951. timer $::temp(badclose) [list putdcc $::pooshy(idx) ":$::pooshy(pseudou) PART $chan"]
  1952. }
  1953. }
  1954. }
  1955.  
  1956. if {[lindex $arg 1] eq "PART"} {antifloodlog;if {$::stoplog eq "1"} {return};putdcc $::pooshy(idx) ":$::pooshy(pseudoe) PRIVMSG $::pooshy(chan) :(\002PART\002) [string trim [lindex $arg 0] :] ~> [lindex $arg 2]"}
  1957.  
  1958. if {[lindex $arg 1] eq "PING"} {
  1959. putdcc $idx "PONG [lindex $arg 1]"
  1960. return
  1961. }
  1962.  
  1963. switch -exact [lindex $arg 1] {
  1964.             "311" {
  1965.             set nick [lindex $arg 3]
  1966.             set ident [lindex $arg 4]
  1967.             set host [lindex $arg 5]
  1968.             set realname [string trim [join [lrange [split $arg] 7 end]] :]
  1969.             set vhost "$nick!$ident@$host"
  1970.             if {$::pooshy(cmd) eq "XWHOIS"} {
  1971.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :\002Nick :\002 $nick"
  1972.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :\002Host :\002 $vhost"
  1973.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :\002Realname :\002 $realname"
  1974.             }
  1975.             if {$::pooshy(cmd) eq "VERIFY"} {
  1976.             if {[verify:a $::fichier(proxy) 0 $host]} {
  1977.             set ::pooshy(cmd) "GLINE"
  1978.             set ::pooshy(nick) $::pooshy(pseudoa)
  1979.             set ::pooshy(hand) $::pooshy(pseudoa)
  1980.             set ::pooshy(raison) $::raison(proxy)
  1981.             set ::pooshy(temp) "1"
  1982.             set ::pooshy(expire) "expire le [clock format [expr $::pooshy(temp) + [clock second]] -format "%d/%m/%Y à %H:%M (GMT+1)"]"
  1983.             set ::pooshy(heure) "[clock format [clock seconds] -format "%Y/%m/%d %H:%M"]"
  1984.             putdcc $::pooshy(idx) ":$::pooshy(pseudoa) WHOIS $nick"
  1985.             }
  1986.             if {[verify:a $::fichier(nick) 0 $nick]} {
  1987.             putdcc $::pooshy(idx) ":$::pooshy(pseudob) KILL $nick $::pooshy(pseudob) ($::raison(nick)) - $::pooshy(pseudob)"
  1988.             }
  1989.             if {[verify:a $::fichier(realname) 0 $realname]} {
  1990.             putdcc $::pooshy(idx) ":$::pooshy(pseudob) KILL $nick $::pooshy(pseudob) ($::raison(realname)) - $::pooshy(pseudob)"
  1991.             }
  1992.             if {[verify:a $::fichier(ident) 0 $ident]} {
  1993.             putdcc $::pooshy(idx) ":$::pooshy(pseudob) KILL $nick $::pooshy(pseudob) ($::raison(ident)) - $::pooshy(pseudob)"
  1994.             }
  1995.             if {[verify:a $::fichier(blacklist) 0 $vhost]} {
  1996.             putdcc $::pooshy(idx) ":$::pooshy(pseudob) KILL $nick $::pooshy(pseudob) (blacklist) - $::pooshy(pseudob)"
  1997.             }
  1998.             }
  1999.             }
  2000.             "314" {
  2001.             set nick [lindex $arg 3]
  2002.             set ident [lindex $arg 4]
  2003.             set host [lindex $arg 5]
  2004.             set realname [string trim [join [lrange [split $arg] 7 end]] :]
  2005.             set vhost "$nick!$ident@$host"
  2006.             if {$::pooshy(cmd) eq "XWHOWAS"} {
  2007.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :\002Nick :\002 $nick"
  2008.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :\002Host :\002 $vhost"
  2009.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :\002Realname :\002 $realname"
  2010.             }
  2011.             }
  2012.             "378" {
  2013.             set host [lindex $arg 8]
  2014.             if {$::pooshy(cmd) eq "KLINE"} {
  2015.             putdcc $::pooshy(idx) ":$::pooshy(link) TKL + k * $host $::pooshy(nick) [expr [unixtime] + $::pooshy(temp)] [unixtime] :$::pooshy(nick) ($::pooshy(raison)), $::pooshy(expire) - $::pooshy(hand) $::pooshy(heure)"
  2016.             set ::pooshy(cmd) -        
  2017.             }
  2018.             if {$::pooshy(cmd) eq "GLINE"} {
  2019.             putdcc $::pooshy(idx) ":$::pooshy(link) TKL + G * $host $::pooshy(nick) [expr [unixtime] + $::pooshy(temp)] [unixtime] :$::pooshy(nick) ($::pooshy(raison)), $::pooshy(expire) - $::pooshy(hand) $::pooshy(heure)"
  2020.             set ::pooshy(cmd) -        
  2021.             }
  2022.             if {$::pooshy(cmd) eq "KLINEALL"} {
  2023.             putdcc $::pooshy(idx) ":$::pooshy(link) TKL + k * $host $::pooshy(nick) [expr [unixtime] + $::pooshy(temp)] [unixtime] :$::pooshy(nick) ($::pooshy(raison)), $::pooshy(expire) - $::pooshy(hand) $::pooshy(heure)"         
  2024.             }
  2025.             if {$::pooshy(cmd) eq "GLINEALL"} {
  2026.             putdcc $::pooshy(idx) ":$::pooshy(link) TKL + G * $host $::pooshy(nick) [expr [unixtime] + $::pooshy(temp)] [unixtime] :$::pooshy(nick) ($::pooshy(raison)), $::pooshy(expire) - $::pooshy(hand) $::pooshy(heure)"         
  2027.             }
  2028.             }
  2029.             "369" {
  2030.             if {$::pooshy(cmd) eq "XWHOWAS"} {
  2031.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :---\002 FIN DU XWHOWAS \002---"
  2032.             set ::pooshy(cmd) -
  2033.             set ::pooshy(nick) "-"
  2034.             }
  2035.             }
  2036.             "317" {
  2037.             set idle [lindex $arg 4]
  2038.             if {$::pooshy(cmd) eq "XWHOIS"} {
  2039.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :\002Idle :\002 [duration $idle]"
  2040.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :---\002 FIN DU XWHOIS \002---"
  2041.             set ::pooshy(cmd) -
  2042.             set ::pooshy(nick) "-"
  2043.             }
  2044.             }
  2045.             "319" {
  2046.             set chan [join [string trim [lrange $arg 4 end] :]]
  2047.             if {$::pooshy(cmd) eq "XWHOIS"} {
  2048.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :\002Chan :\002 $chan"
  2049.             }
  2050.             }
  2051.             "378" {
  2052.             set host [lindex $arg 7]
  2053.             set ip [lindex $arg 8]
  2054.             if {$::pooshy(cmd) eq "XWHOIS"} {
  2055.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :\002Host décodé :\002  $host"
  2056.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :\002Ip :\002  $ip"
  2057.             }
  2058.             }
  2059.             "352" {
  2060.             set nick [lindex $arg 7]
  2061.             set chan [lindex $arg 3]
  2062.             set ident [lindex $arg 4]
  2063.             set host [lindex $arg 5]
  2064.             if {[verify:b $::fichier(socket) 0 $nick]||[string equal -nocase $nick $::botnick]||[string equal -nocase $nick $::pooshy(pseudoa)]||[string equal -nocase $nick $::pooshy(pseudob)]||[string equal -nocase $nick $::pooshy(pseudor)]||[string equal -nocase $nick $::pooshy(pseudos)]||[string equal -nocase $nick $::pooshy(pseudoh)]||[string equal -nocase $nick $::pooshy(pseudog)]||[string equal -nocase $nick $::pooshy(pseudod)]||[string equal -nocase $nick $::pooshy(pseudoe)]||[string equal -nocase $nick $::pooshy(pseudoo)]||[string equal -nocase $nick $::pooshy(pseudoi)]||[string equal -nocase $nick $::pooshy(pseudou)]} {return}
  2065.             if {$::pooshy(cmd) eq "OPALL"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan +o $nick";return}
  2066.             if {$::pooshy(cmd) eq "DEOPALL"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan -o $nick";return}
  2067.             if {$::pooshy(cmd) eq "VOICEALL"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan +v $nick";return}
  2068.             if {$::pooshy(cmd) eq "DEVOICEALL"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan -v $nick";return}
  2069.             if {$::pooshy(cmd) eq "HALFOPALL"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan +h $nick";return}
  2070.             if {$::pooshy(cmd) eq "DEHALFOPALL"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan -h $nick";return}
  2071.             if {$::pooshy(cmd) eq "KICKALL"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) KICK $chan $nick :$::pooshy(raison) - $::pooshy(hand)";return}
  2072.             if {$::pooshy(cmd) eq "CLOSE"} {putdcc $::pooshy(idx) ":$::pooshy(pseudou) KICK $chan $nick :Salon fermé !";return}
  2073.             if {$::pooshy(cmd) eq "BANALL"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan +b *!*@$host";return}
  2074.             if {$::pooshy(cmd) eq "KICKBANALL"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan +b *!*@$host";putdcc $::pooshy(idx) ":$::pooshy(pseudoo) KICK $chan $nick :$::pooshy(raison) - $::pooshy(hand)";return}
  2075.             if {$::pooshy(cmd) eq "KILLALL"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) KILL $nick $::pooshy(pseudoo) ($::pooshy(raison)) - $::pooshy(hand)";return}
  2076.             if {$::pooshy(cmd) eq "KLINEALL"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) WHOIS $nick";return}
  2077.             if {$::pooshy(cmd) eq "GLINEALL"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) WHOIS $nick";return}
  2078.             }
  2079.             "219" {
  2080.             if {$::pooshy(cmd) eq "KLINELIST"} {
  2081.             if {![info exists pooshy(num)]} {set ::pooshy(num) "0"}
  2082.             if {$::pooshy(num) eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :Aucun kline"; }
  2083.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :---\002 FIN DE LA LISTE \002--- Total Kline (\002$::pooshy(num)\002)"
  2084.             set ::pooshy(cmd) -
  2085.             unset ::pooshy(num)
  2086.             return
  2087.             }
  2088.             if {$::pooshy(cmd) eq "UNKLINEALL"} {
  2089.             if {![info exists pooshy(num)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :\002 Erreur :\002 La klinelist est vide.";}
  2090.             return
  2091.             }
  2092.             if {$::pooshy(cmd) eq "GLINELIST"} {
  2093.             if {![info exists pooshy(num)]} {set ::pooshy(num) "0"}
  2094.             if {$::pooshy(num) eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :Aucun gline"; }
  2095.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :---\002 FIN DE LA LISTE \002--- Total Gline (\002$::pooshy(num)\002)"
  2096.             set ::pooshy(cmd) -
  2097.             unset ::pooshy(num)
  2098.             return
  2099.             }
  2100.             if {$::pooshy(cmd) eq "UNGLINEALL"} {
  2101.             if {![info exists pooshy(num)]} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :\002 Erreur :\002 La glinelist est vide."}
  2102.             set ::pooshy(cmd) -
  2103.             return
  2104.             }
  2105.             }
  2106.             "223" {
  2107.             set host [lindex $arg 4]
  2108.             set nick [lindex $arg 7]
  2109.             set raison [string trim [lrange [split $arg] 8 end] :]
  2110.             if {$::pooshy(cmd) eq "KLINELIST"} {
  2111.             incr pooshy(num) 1
  2112.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :(\002$::pooshy(num)\002) $host mis par \002$nick\002 (raison : $raison)."
  2113.             return
  2114.             }
  2115.             if {$::pooshy(cmd) eq "UNKLINEALL"} {
  2116.             set ::pooshy(num) "0"
  2117.             putdcc $::pooshy(idx) ":$::pooshy(link) TKL - k [lindex [split $host @] 0] [lindex [split $host @] 1] $::pooshy(pseudoo)"
  2118.             return
  2119.             }
  2120.             if {$::pooshy(cmd) eq "UNGLINEALL"} {
  2121.             set ::pooshy(num) "0"
  2122.             putdcc $::pooshy(idx) ":$::pooshy(link) TKL - G [lindex [split $host @] 0] [lindex [split $host @] 1] $::pooshy(pseudoo)"
  2123.             return
  2124.             }
  2125.             if {$::pooshy(cmd) eq "GLINELIST"} {
  2126.             incr pooshy(num) 1
  2127.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :(\002$::pooshy(num)\002) $host mis par \002$nick\002 (raison : $raison)."
  2128.             return
  2129.             }
  2130.             }
  2131.             "367" {
  2132.             set chan [lindex $arg 3]
  2133.             set host [lindex $arg 4]
  2134.             set nick [lindex $arg 5]
  2135.             if {$::pooshy(cmd) eq "UNBANALL"} {putdcc $::pooshy(idx) ":$::pooshy(pseudoo) MODE $chan -b $host";return}
  2136.             if {$::pooshy(cmd) eq "BANLIST"} {
  2137.             incr pooshy(num) 1
  2138.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :(\002$::pooshy(num)\002) $host mis par $nick.";
  2139.             return
  2140.             }
  2141.             }
  2142.             "368" {
  2143.             if {$::pooshy(cmd) eq "BANLIST"} {
  2144.             if {![info exists pooshy(num)]} {set ::pooshy(num) "0"}
  2145.             if {$::pooshy(num) eq "0"} { putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :Aucan ban"; }
  2146.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :---\002 FIN DE LA LISTE \002--- Total Ban (\002$::pooshy(num)\002)";
  2147.             unset ::pooshy(num)
  2148.             return
  2149.             }
  2150.             }
  2151.             "401" {
  2152.             set pseudo [lindex $arg 3]
  2153.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :\002Erreur :\002 Le pseudo $pseudo est introuvable."
  2154.             set ::pooshy(nick) "-"
  2155.             }
  2156.             "402" {
  2157.             set pseudo [lindex $arg 3]
  2158.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :\002Erreur :\002 Le pseudo $pseudo est introuvable."
  2159.             set ::pooshy(nick) "-"
  2160.             }
  2161.             "403" {
  2162.             set chan [lindex $arg 3]
  2163.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :\002Erreur :\002 Le channel $chan est introuvable."
  2164.             set ::pooshy(nick) "-"
  2165.             }
  2166.             "406" {
  2167.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :Le pseudo n'est pas ou plus enregistré dans la base whowas."
  2168.             set ::pooshy(nick) "-"
  2169.             }
  2170.             "443" {
  2171.             set pseudo [lindex $arg 3]
  2172.             set chan [lindex $arg 4]
  2173.             putdcc $::pooshy(idx) ":$::pooshy(pseudoo) NOTICE $::pooshy(nick) :\002Erreur :\002 $pseudo est déjà sur $chan."
  2174.             set ::pooshy(nick) "-"
  2175.             }
  2176. }
  2177. }
  2178.  
  2179. ################
  2180. # VERIFY PROXY #
  2181. ################
  2182.  
  2183. proc proxy:check {host nick} {
  2184.     set liste [open $::fichier(port) r]
  2185.     while {![eof $liste]} {
  2186.     gets $liste a
  2187.     if {$a ne ""} {
  2188.         if {[catch {set sock [socket -async $host [lindex $a 0]]} error]} {
  2189.             return 0
  2190.         } else {
  2191.             set timerid [utimer 30 [list portcheck:timeout $sock $host [lindex $a 0]]]
  2192.             fileevent $sock writable [list portcheck:connect $sock $host [lindex $a 0] $timerid $nick]
  2193.         }
  2194.  
  2195. }
  2196.     }
  2197.     close $liste
  2198. }
  2199.  
  2200. proc portcheck:connect {sock host port timerid nick} {
  2201.     killutimer $timerid
  2202.     set error [fconfigure $sock -error]
  2203.     if {$error ne ""} {
  2204.         close $sock
  2205.         return 0
  2206.     } else {
  2207.         fileevent $sock writable {}
  2208.         set ::pooshy(cmd) "GLINE"
  2209.         set ::pooshy(nick) $::pooshy(pseudoa)
  2210.         set ::pooshy(hand) $::pooshy(pseudoa)
  2211.         set ::pooshy(raison) $::raison(proxy)
  2212.         set ::pooshy(temp) $::temp(proxy)
  2213.         set ::pooshy(expire) "expire le [clock format [expr $::pooshy(temp) + [clock second]] -format "%d/%m/%Y à %H:%M (GMT+1)"]"
  2214.         set ::pooshy(heure) "[clock format [clock seconds] -format "%Y/%m/%d %H:%M"]"
  2215.         putdcc $::pooshy(idx) ":$::pooshy(pseudoa) WHOIS $nick"
  2216.     }
  2217. }
  2218.  
  2219. proc portcheck:timeout {sock host port} {
  2220.     close $sock
  2221.     return 0
  2222. }
  2223.  
  2224. #################
  2225. # ANTIFLOOD LOG #
  2226. #################
  2227.  
  2228. proc antifloodlog {} {
  2229. if {![info exists ::stoplog]} {set ::stoplog 0}
  2230. if {$::stoplog eq "1"} {return}
  2231. if {![info exists ::massmsg]} {set ::massmsg 0 ;utimer 3 [list unset ::massmsg]}
  2232. incr ::massmsg 1
  2233. if {$::massmsg eq "20"} {set ::stoplog 1;putdcc $::pooshy(idx) ":$::pooshy(pseudoe) PRIVMSG $::pooshy(chan) :(\002ANTIFLOOD\002) Trop de messages. Arrêt pendant 20 secondes."; utimer 20 {putdcc $::pooshy(idx) ":$::pooshy(pseudoe) PRIVMSG $::pooshy(chan) :(\002ANTIFLOOD\002) Réactivation.";set ::stoplog 0}}
  2234. }
  2235.  
  2236. ######################
  2237. # TRAITEMENT FICHIER #
  2238. ######################
  2239.  
  2240. proc verify:a {fichierss numero arg} {
  2241. set liste [open $fichierss r]
  2242. while {![eof $liste]} {
  2243. gets $liste a
  2244. if {$a ne ""} {if {[string match -nocase *[lindex $a $numero]* $arg]} {close $liste;return 1}}
  2245. }
  2246. close $liste
  2247. return 0
  2248. }
  2249.  
  2250. proc verify:b {fichierss numero arg} {
  2251. set liste [open $fichierss r]
  2252. while {![eof $liste]} {
  2253. gets $liste a
  2254. if {$a ne ""} {if {[string equal -nocase [lindex $a $numero] $arg]} {close $liste;return 1}}
  2255. }
  2256. close $liste
  2257. return 0
  2258. }
  2259.  
  2260. proc verify:c {fichierss numero arg} {
  2261. set liste [open $fichierss r]
  2262. while {![eof $liste]} {
  2263. gets $liste a
  2264. if {$a ne ""} {if {[string match *$arg* *[lindex $a $numero ]*]} {close $liste;return 1}}
  2265. }
  2266. close $liste
  2267. return 0
  2268. }
  2269.  
  2270. proc islevel {nick flag} {
  2271. set liste [open $::fichier(alist) r]
  2272. while {![eof $liste]} {
  2273. gets $liste a
  2274. if {[string equal -nocase [lindex $a 2] $nick]} {set level [lindex $a 1]}
  2275. }
  2276. if {[string match *$flag* $level]} {return 1} else {return 0}
  2277. }
  2278.  
  2279. proc isnick {nick newnick} {
  2280. set fichier(back:alist) "$::fichier(alist).back"
  2281. set load [open $fichier(back:alist) w+]
  2282. close $load
  2283. set liste [open $::fichier(alist) r]
  2284. set bcloseback [open $fichier(back:alist) a]
  2285. while {![eof $liste]} {
  2286. gets $liste a
  2287. if {$a ne ""} {if {[string  equal -nocase [lindex $a 2] $nick]} {puts $bcloseback "[lindex $a 0] [lindex $a 1] $newnick"} else {puts $bcloseback "[lindex $a]"}}
  2288. }
  2289. close $liste
  2290. close $bcloseback
  2291. file delete $::fichier(alist)
  2292. file rename $fichier(back:alist) $::fichier(alist)
  2293. }
  2294.  
  2295. proc ajouter:donnee {fichierss args} {
  2296. set liste [open $fichierss a]
  2297. puts $liste "$args"    
  2298. close $liste
  2299. }
  2300.  
  2301. proc effacer:donnee {fichierss numero arg} {
  2302. set fichier(back) "$fichierss.back"
  2303. set load [open $fichier(back) w+]
  2304. close $load
  2305. set liste [open $fichierss r]
  2306. set bcloseback [open $fichier(back) a]
  2307. while {![eof $liste]} {
  2308. gets $liste a
  2309. if {$a ne ""} {if {[string  equal -nocase [lindex $a $numero] $arg]} {} else {puts $bcloseback "[lindex $a]"}}
  2310. }
  2311. close $liste
  2312. close $bcloseback
  2313. file delete $fichierss
  2314. file rename $fichier(back) $fichierss
  2315. }
  2316.  
  2317. proc debug {arg} {
  2318. regsub -all -- {\{|\}|\\{|[}{|]}} $arg "" arg
  2319. return $arg
  2320. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement