Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum. Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !

SCANNER DE HOST / BANLIST EN ECHO / STATS CHAN


Information sur la source

Catégorie :Divers Niveau : Débutant Date de création : 11/05/2004 Vu : 3 584

Note :
4,4 / 10 - par 5 personnes
4,40 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

Commentaire sur cette source (5)
Ajouter un commentaire et/ou une note

Description

3 Alias qui peuvent etre bien pratique

- Permet la recherche d'un host en particulier
- Donne la banlist en echo
- Effectue un "rapport" du salon actif et met en echo les modes / topic etc ...
 

Source

  • Menu channel {
  • Scanner
  • .Scanner de host:/scanhost $chan $$?="Host a scanner ? (*!*@host.domaine) :"
  • .Banliste de $chan:/banliste $chan
  • .Informations $chan:/rapport $chan
  • }
  • alias scanhost {
  • if ( $2 == $null ) { /perso Utilise /scanhost #Salon *!*@host ! | halt }
  • /var %scanhost.chan = $1
  • /var %scanhost.host = $2
  • /var %i = 1
  • /escan Scan-host sur %scanhost.chan
  • if ( $ialchan(%scanhost.host,%scanhost.chan,0) == 0 ) || ( $ialchan(%scanhost.host,%scanhost.chan,0) == $null ) {
  • /escan Host_cherché4 %scanhost.host
  • /escan Host Aucun host correspondant à %scanhost.host
  • goto finscanhost
  • }
  • /escan Host cherché :4 %scanhost.host
  • :bouclescanhost
  • if ( $ialchan(%scanhost.host,%scanhost.chan,0) >= %i ) {
  • /escan Host_n° $+ %i $+  $ialchan(%scanhost.host,%scanhost.chan,%i)
  • inc %i 1
  • goto bouclescanhost
  • }
  • :finscanhost
  • /escan Fin Scan-host
  • unset %i
  • unset %scanhost.chan
  • unset %scanhost.host
  • }
  • alias banliste {
  • if ( $1 == $null ) { /perso Utilise /banliste #Salon | /halt }
  • set %chan.ban $1
  • set %i 1
  • /eban Ban-liste sur %chan.ban
  • if ( $ibl(%chan.ban,0) == $null ) || ( $ibl(%chan.ban,0) == 0 ) {
  • /eban Ban Aucun ban mis pour %chan.ban
  • goto finbanliste
  • }
  • :bouclebanliste
  • /eban Ban_n° $+ %i $ibl(%chan.ban,%i) $ibl(%chan.ban,%i).by $ibl(%chan.ban,%i).date
  • inc %i 1
  • if ( %i <= $ibl(%chan.ban,0) ) { goto bouclebanliste }
  • :finbanliste
  • /eban Fin Ban-liste
  • unset %i
  • unset %chan.ban
  • }
  • alias rapport {
  • if ( $1 == $null ) { /perso Utilise /rapport #Salon | /halt }
  • set %rapport.chan $1
  • /salon Rapport pour : 1 $+ %rapport.chan
  • /salon Nom : 1 $+ %rapport.chan
  • if ( $chan(%rapport.chan).topic == $null ) { /salon Topic :1 Aucun }
  • else { /salon Topic :1 $chan(%rapport.chan).topic }
  • if ( $chan(%rapport.chan).mode == $null ) { /salon Mode :1Aucun }
  • else { /salon Mode :1 $chan(%rapport.chan).mode }
  • /salon Ops :12 $opnick(%rapport.chan,0) $+ @
  • /salon Voices :3 $vnick(%rapport.chan,0) $+ +
  • /salon Users :1 $nick(%rapport.chan,0)
  • /salon Fin du rapport
  • unset %rapport.chan
  • }
  • Alias escan { echo 10 -a $timestamp [ Scanner ]1 $1- }
  • Alias eban { echo 14 -a $timestamp [ Banlist ]1 $1- }
  • Alias salon { echo 6 -a $timestamp [ Informations ]  $+ $$1- }
Menu channel { 
  Scanner
  .Scanner de host:/scanhost $chan $$?="Host a scanner ? (*!*@host.domaine) :"
  .Banliste de $chan:/banliste $chan
  .Informations $chan:/rapport $chan
}

alias scanhost {
  if ( $2 == $null ) { /perso Utilise /scanhost #Salon *!*@host ! | halt }
  /var %scanhost.chan = $1
  /var %scanhost.host = $2
  /var %i = 1
  /escan Scan-host sur %scanhost.chan
  if ( $ialchan(%scanhost.host,%scanhost.chan,0) == 0 ) || ( $ialchan(%scanhost.host,%scanhost.chan,0) == $null ) {
    /escan Host_cherché4 %scanhost.host
    /escan Host Aucun host correspondant à %scanhost.host
    goto finscanhost
  }
  /escan Host cherché :4 %scanhost.host
  :bouclescanhost
  if ( $ialchan(%scanhost.host,%scanhost.chan,0) >= %i ) {
    /escan Host_n° $+ %i $+  $ialchan(%scanhost.host,%scanhost.chan,%i)
    inc %i 1
    goto bouclescanhost
  }
  :finscanhost
  /escan Fin Scan-host
  unset %i
  unset %scanhost.chan
  unset %scanhost.host
}

alias banliste {
  if ( $1 == $null ) { /perso Utilise /banliste #Salon | /halt }
  set %chan.ban $1
  set %i 1
  /eban Ban-liste sur %chan.ban
  if ( $ibl(%chan.ban,0) == $null ) || ( $ibl(%chan.ban,0) == 0 ) {
    /eban Ban Aucun ban mis pour %chan.ban
    goto finbanliste
  }
  :bouclebanliste
  /eban Ban_n° $+ %i $ibl(%chan.ban,%i) $ibl(%chan.ban,%i).by $ibl(%chan.ban,%i).date
  inc %i 1
  if ( %i <= $ibl(%chan.ban,0) ) { goto bouclebanliste }
  :finbanliste
  /eban Fin Ban-liste
  unset %i
  unset %chan.ban
}

alias rapport {
  if ( $1 == $null ) { /perso Utilise /rapport #Salon | /halt }
  set %rapport.chan $1
  /salon Rapport pour : 1 $+ %rapport.chan
  /salon Nom : 1 $+ %rapport.chan
  if ( $chan(%rapport.chan).topic == $null ) { /salon Topic :1 Aucun }
  else { /salon Topic :1 $chan(%rapport.chan).topic }
  if ( $chan(%rapport.chan).mode == $null ) { /salon Mode :1Aucun }
  else { /salon Mode :1 $chan(%rapport.chan).mode }
  /salon Ops :12 $opnick(%rapport.chan,0) $+ @
  /salon Voices :3 $vnick(%rapport.chan,0) $+ +
  /salon Users :1 $nick(%rapport.chan,0)
  /salon Fin du rapport
  unset %rapport.chan
}

Alias escan { echo 10 -a $timestamp [ Scanner ]1 $1- }
Alias eban { echo 14 -a $timestamp [ Banlist ]1 $1- }
Alias salon { echo 6 -a $timestamp [ Informations ]  $+ $$1- }

Conclusion

A vous de voir =)
 

Commentaires et avis

signaler à un administrateur
Commentaire de Seregon le 11/05/2004 20:16:47

Pfff loop en goto, des / partout avant tes commandes,  des if ($1 == $null) o lieu de if (!$1), peu original, manque de configuration et de souplesse de ton systeme "Obliger de specifier un host a scanner -_-)
Bref si c pour faire le sourd a tout ckon dit je vois vrmt pas l'interet

signaler à un administrateur
Commentaire de SornDrixer le 12/05/2004 07:06:03 administrateur CS

Au lieu d'utiliser /set, utilise /var.
Fais tes boucles avec while au lieu de goto, c'est plus pratique, et cela sera plus rapide sur un très gros chan.
C'est pas très original, et pas très utile, mais c'est quand même plus poussé que ta précédente source.

signaler à un administrateur
Commentaire de tofu le 12/05/2004 16:53:46

on peut faire le meme code en quelques lignes,
(une dizaine, même pas), avec des whiles.

signaler à un administrateur
Commentaire de Proutie66 le 12/05/2004 21:04:16

TU debutes , ca se voit :)
5 / 10

signaler à un administrateur
Commentaire de modserv le 25/06/2008 13:43:27

sa peut paraitre con mais bon - comment on la demare ste remote ....

Ajouter un commentaire



Nos sponsors

Sondage...

CalendriCode

Juillet 2009
LMMJVSD
  12345
6789101112
13141516171819
20212223242526
2728293031  

Consulter la suite du CalendriCode

Comparez les prix Nouvelle version

Photothèque Nouveau !



Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés
Temps d'éxécution de la page : 0,577 sec

Google Coop CodeS-SourceS Google Coop CodeS-SourceS


Certaines images présentes sur le site (notament certains avatars) sont issues des collections IconShock, donc si vous souhaitez utiliser ces icons vous devez les acheter, ne les copiez pas et ne utilisez pas dans vos sites et applications sans les avoir commandé.