Systeme de news assé symple ki peux gérer les news sur plusieurs chans
Source / Exemple :
on *:text:!setnews*:#chan: {
if (!$2) {
msg $chan 4,0.:.1 Syntaxe: !setnews n° news 4,0.:.
halt
}
if (!$3) {
msg $chan 4,0.:.1 Syntaxe: !setnews n° news 4,0.:.
halt
}
if ($2 !isnum) {
msg $chan 4,0.:.1 Syntaxe: !setnews n° news 4,0.:.
halt
}
if ($2 > 1000) {
msg $chan 4,0.:.1 Le n° doit être comprit entre 0 & 1000 4,0.:.
halt
}
set %news [ $+ [ $chan ] $+ [ . ] $+ [ $round($2,0) ] ] $3-
msg $chan 4,0.:.1 News n° $2 : %news [ $+ [ $chan ] $+ [ . ] $+ [ $round($2,0) ] ] 4,0.:.
}
on *:text:!delnews*:#chan: {
if (!$2) {
msg $chan 4,0.:.1 Syntaxe: !delnews n° 4,0.:.
halt
}
if ($2 !isnum) {
msg $chan 4,0.:.1 Syntaxe: !setnews n° news 4,0.:.
halt
}
if ($2 > 1000) {
msg $chan 4,0.:.1 Le n° doit être comprit entre 0 & 1000 4,0.:.
halt
}
unset %news [ $+ [ $chan ] $+ [ . ] $+ [ $round($2,0) ] ]
msg $chan 4,0.:.1 News n° $round($2,0) : supprimée 4,0.:.
}
on *:text:!news*:#chan: {
if (!$2) {
msg $chan 4,0.:.1 Syntaxe: !news n° 4,0.:.
halt
}
if ($2 !isnum) {
msg $chan 4,0.:.1 Syntaxe: !news n° 4,0.:.
halt
}
if ($2 > 1000) {
msg $chan 4,0.:.1 Le n° doit être comprit entre 0 & 1000 4,0.:.
halt
}
if (!%news [ $+ [ $chan ] $+ [ . ] $+ [ $2 ] ]) {
msg # 4,0.:.1 La news $2 : N'existe pas 4,0.:.
halt
}
msg # 4,0.:.1 News $2 : %news [ $+ [ $chan ] $+ [ . ] $+ [ $2 ] ] 4,0.:.
}
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.