22
0
Fork 0

ajout sic

This commit is contained in:
pdiogoantunes 2017-03-16 12:09:45 +01:00
parent 7356f35f47
commit b3a0c199f2
1 changed files with 35 additions and 1 deletions

View File

@ -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 <evouser> evoadmin: Salut \0/
~~~