[color:#006600]; Data management - Read/Write/Delete
;[/color]
alias CustomBeep {
if ($isid) return $readini(MyBeepSettings.ini,CustomBeeps,$1)
elseif ($1 == -r) remini MyBeepSettings.ini CustomBeeps $2
else writeini MyBeepSettings.ini CustomBeeps $1 $+(",$$sfile($wavedir*.wav,Load custom beep,New Beep),")
}
[color:#006600]; User Interface - Dynamic Popups
;[/color]
menu channel {
-
.$iif($CustomBeep($chan),Change,Add) Beep: CustomBeep $chan
.$iif($CustomBeep($chan),Remove Beep): CustomBeep -r $chan
}
menu query,nicklist,menubar {
-
.$iif($CustomBeep($1),Change,Add) Beep: CustomBeep $1
.$iif($CustomBeep($1),Remove Beep): CustomBeep -r $1
}
[color:#006600]; Script Engine
;[/color]
on *:TEXT:*:?: CBeep $nick
on *:TEXT:*:#: CBeep $chan
[color:#006600];
; Provide a way to continue the currently splaying MP3 (if there is one)
;
; NOTE: This section could interfere with any other MP3 players
; that use mIRC to /splay a random or playlist MP3.
;[/color]
alias CBeep {
if ((!$CustomBeep($1)) || ($active == $1)) return
if (($right($insong.fname,4) == .mp3) && (!%InSong.FName)) {
set -u600 %InSong.FName = $+(",$insong.fname,")
set -u600 %InSong.Pos = $insong.pos
.splay -p stop
}
.splay $CustomBeep($1)
}
on *:MIDIEND: Continue.MP3
on *:WAVEEND: Continue.MP3
on *:MP3END: Continue.MP3
alias Continue.MP3 {
if (!%InSong.FName) return
.splay %InSong.FName
.splay seek %InSong.Pos
unset %InSong.*
}