Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:START: {
- hmake -s musiques 1000
- hload musiques bdd.txt
- }
- on *:EXIT: {
- hsave -o musiques bdd.txt
- hfree -s musiques
- }
- on ^*:TEXT:*:#: {
- if ($1 == !search) {
- set %found $chr(32)
- set %i 0
- while (%i != 1000) {
- set %hash $replace($hget(musiques,item- $+ [ %i ]),+,$chr(32))
- if ($2- isin %hash) {
- set %found %found $+ %hash (item %i $+ ),
- }
- set %i $calc(%i + 1)
- }
- set %found Item(s) trouvé(s) : %found
- msg $chan $left(%found,$calc($len(%found) - 1))
- msg $chan Tapez !get <numéro d'item> pour avoir un fichier.
- }
- elseif ($1 == !whatis) {
- set %truc $replace($hget(musiques,item- $+ [ $2 ]),+,$chr(32))
- if (%truc) { msg $chan L'élément $2- est : %truc }
- else { msg $chan Elément $2- introuvable dans la base de données. }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement