Exemple de tcl en dcc

Soyez le premier à donner votre avis sur cette source.

Snippet vu 5 188 fois - Téléchargée 16 fois

Contenu du snippet

voilà un tcl que j'utilise pour mon bot en dcc si sa peut aider certaine personnes de si inspirer :)
il et basser sur un bot purtcl donc au pire modifier les "if {$levelnick>=0} {
par exemple.

Source / Exemple :


namespace eval helpcmds {}
       
      bind dcc 0 cmds helpcmds::aide
      proc helpcmds::aide {hand idx arg}  {
      set levelnick [getlevel $hand]
      putdcc $idx "\00300,01AIDE => Commandes Robot XyLoO"
      putdcc $idx "_"
      putdcc $idx "$hand => $levelnick"
      if {$levelnick>=0} {
      putdcc $idx "\0031Level \002NULL\002 \0031($::botnick) : \037COMMANDES Pincipales\037"
      putdcc $idx "_"
      putdcc $idx "\0033Admin \0034Commandes \0031: \0032!admins"
      putdcc $idx "\0033Auth \0034Commandes \0031: \0032 /msg $::botnick auth [hand2nick $hand] pass"
      putdcc $idx "\0033Cmds \0034Commandes \0031: \0032!cmds"
      putdcc $idx "_"
      }
      if {$levelnick>=1} {
      putdcc $idx "\0031Level \002I\002 \0031($::botnick) : \037COMMANDES Pincipales\037"
      putdcc $idx "_"
      putdcc $idx "\0033Access \0034Commandes \0031: \0032!access"
      putdcc $idx "\0033Autovoice \0034Commandes \0031: \0032!autovoice"
      putdcc $idx "\0033Admin \0034Commandes \0031: \0032!admins"
      putdcc $idx "\0033Addquote \0034Commandes \0031: \0032!addquote <text>"
      putdcc $idx "\0033Findquote \0034Commandes \0031: \0032!findquote <text>"
      putdcc $idx "\0033Statsquote \0034Commandes \0031: \0032!statsquote"
      putdcc $idx "\0033Quote \0034Commandes \0031: \0032!quote <n°>"
      putdcc $idx "\0033Man \0034Commandes \0031: \0032!man <commande> option"
      putdcc $idx "\0033Voice \0034Commandes \0031: \0032!voice ou !voice <pseudo>"
      putdcc $idx "\0033Devoice \0034Commandes \0031: \0032!devoice ou !devoice <pseudo>"
      putdcc $idx "\0033Voiceall \0034Commandes \0031: \0032!voiceall"
      putdcc $idx "\0033Devoiceall \0034Commandes \0031: \0032!devoiceall"
      putdcc $idx "_"
      }
      if {$levelnick>=2} {
      putdcc $idx "\0031Level \002II\002 \0031($::botnick) : \037COMMANDES Opérateurs\037"
      putdcc $idx "_"
      putdcc $idx "\0033Op \0034Commandes \0031: \0032!op ou !op <pseudo>"
      putdcc $idx "\0033Deop \0034Commandes \0031: \0032!deop ou !deop <pseudo>"
      putdcc $idx "\0033Opall \0034Commandes \0031: \0032!opall"
      putdcc $idx "\0033Deopall \0034Commandes \0031: \0032!deopall"
      putdcc $idx "\0033Mode \0034Commandes \0031: \0032!mode <mode>"
      putdcc $idx "\0033Ban \0034Commandes \0031: \0032!ban <host/nick>"
      putdcc $idx "\0033Unban \0034Commandes \0031: \0032!unban <host>"
      putdcc $idx "\0033Banlist \0034Commandes \0031: \0032!banlist"
      putdcc $idx "\0033Clearbans \0034Commandes \0031: \0032!clearbans"
      putdcc $idx "\0033Kick \0034Commandes \0031: \0032!kick <pseudo> raison"
      putdcc $idx "\0033Kickban \0034Commandes \0031: \0032!kickban <pseudo> raison"
      putdcc $idx "\0033Topic \0034Commandes \0031: \0032!topic <phrase>"
      putdcc $idx "_"
      }
      if {$levelnick>=3} {
      putdcc $idx "\0031Level \002III\002 \0031($::botnick) : \037COMMANDES Chan-Master\037"
      putdcc $idx "_"
      putdcc $idx "\0033Deluser \0034Commandes \0031: \0032!deluser <pseudo>"
      putdcc $idx "\0033Join \0034Commandes \0031: \0032!join <salon>"
      putdcc $idx "\0033Part \0034Commandes \0031: \0032!part <salon>"
      putdcc $idx "\0033Uptime \0034Commandes \0031: \0032!uptime"
      putdcc $idx "\0033Xbl \0034Commandes \0031: \0032!xbl <pseudo>"
      putdcc $idx "\0033Xblist \0034Commandes \0031: \0032!xblist"
      putdcc $idx "\0033Xdelbl \0034Commandes \0031: \0032!xdelbl"
      putdcc $idx "_"
      }
      if {$levelnick>=4} {
      putdcc $idx "\0031Level \002IV\002 \0031($::botnick) : \037COMMANDES Administrateurs\037"
      putdcc $idx "_"
      putdcc $idx "\0033Autorise \0034Commandes \0031: \0032!autorise <pseudo>"
      putdcc $idx "\0033Deautorise \0034Commandes \0031: \0032!deautorise <pseudo>"
      putdcc $idx "\0033Die \0034Commandes \0031: \0032!die"
      putdcc $idx "\0033Restart \0034Commandes \0031: \0032!restart <phrase> ou sans"
      putdcc $idx "\0033Rehash \0034Commandes \0031: \0032!rehash"
      putdcc $idx "\0033Save \0034Commandes \0031: \0032!save"
      putdcc $idx "\0033Version \0034Commandes \0031: \0032!version"
      putdcc $idx "\0033Tcl \0034Commandes \0031: \0032!tcl <argument>"
      putdcc $idx "_"
      }
      }

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.