- on *:TEXT:!news:#:{
- set %x $lines(news.txt)
- if (%x != 0) {
- var %i = 1
- .timer 1 %x msg $chan 4[12FIN DES NEWS4]
- msg $chan 4[12NEWS4]
- while (%i <= %x) {
- msg $chan $read(news.txt,%i)
- inc %i
- }
- }
- else {
- msg $chan 4[12AUCUNES NEWS DISPONIBLES4]
- }
- }
- on *:TEXT:addnews*:?:{
- if ($nick == %pseudo) {
- set %x [ $lines(news.txt) + 1 ]
- write -l $+ %x news.txt $2-
- notice $nick Changement des news effectué
- }
- else {
- notice $nick Vous n'avez pas accé à cette commande !
- }
- }
- on *:TEXT:erasenews:?:{
- if ($nick == %pseudo) {
- write -c news.txt
- notice $nick Toutes les news ont été supprimer !
- }
- else {
- notice $nick Vous n'avez pas accé à cette commande !
- }
- }
on *:TEXT:!news:#:{
set %x $lines(news.txt)
if (%x != 0) {
var %i = 1
.timer 1 %x msg $chan 4[12FIN DES NEWS4]
msg $chan 4[12NEWS4]
while (%i <= %x) {
msg $chan $read(news.txt,%i)
inc %i
}
}
else {
msg $chan 4[12AUCUNES NEWS DISPONIBLES4]
}
}
on *:TEXT:addnews*:?:{
if ($nick == %pseudo) {
set %x [ $lines(news.txt) + 1 ]
write -l $+ %x news.txt $2-
notice $nick Changement des news effectué
}
else {
notice $nick Vous n'avez pas accé à cette commande !
}
}
on *:TEXT:erasenews:?:{
if ($nick == %pseudo) {
write -c news.txt
notice $nick Toutes les news ont été supprimer !
}
else {
notice $nick Vous n'avez pas accé à cette commande !
}
}