diff --git a/Howtoii.md b/Howtoii.md index 7e845ea8..21e69a6a 100644 --- a/Howtoii.md +++ b/Howtoii.md @@ -48,7 +48,7 @@ $ tail -f ~/.irc/localhost/\#channel/out Pour savoir lorsque nouveaux messages et être certains de récupérer la nouvelle ligne (dans script - pour un bot par exemple), il faut rendre le fichier 'out' en un fichier FIFO => donc pas de logs possible. -~~~ +~~~{.bash} $ rm "~/.irc/localhost/\#channel/out" $ mkfifo "~/.irc/localhost/\#channel/out" $ cat "~/.irc/localhost/\#channel/out" @@ -57,3 +57,37 @@ $ ~~~ # Le petit frère sic + +Avec **sic**, pas de répertoire et de hiérarchie de server/#channel/fichier, tout se passe avec STDIN et STDOUT (donc très pratique pour une automatisation simplifié dans un script) : + +~~~{.bash} +$ sic -h localhost -p 6667 -n evouser +localhost: 03/16/17 11:58 >< NOTICE (*): *** Looking up your hostname +localhost: 03/16/17 11:58 >< NOTICE (*): *** Checking Ident +localhost: 03/16/17 11:58 >< NOTICE (*): *** No Ident response +localhost: 03/16/17 11:58 >< NOTICE (*): *** Found your hostname +localhost: 03/16/17 11:58 >< 001 (evouser): Welcome to the irc Internet Relay Chat Network evouser +... +~~~ + +à partir de là, en entrée on peut se connecter à un channel : + +~~~{.bash} +:j #test +evouser : 03/16/17 12:02 >< JOIN (): #test +localhost: 03/16/17 12:02 >< 353 (evouser = #test): evouser +localhost: 03/16/17 12:02 >< 366 (evouser #test): End of /NAMES list. +~~~ + +Voir si quelqu'un se connecte : + +~~~{.bash} +evoadmin : 03/16/17 12:03 >< JOIN (): #test +~~~ + +Puis envoyer un message sur ce même channel : + +~~~{.bash} +:m #test evoadmin: Salut \0/ +#test : 03/16/17 12:08 evoadmin: Salut \0/ +~~~ \ No newline at end of file