ChanSound

Use right-click > ChanSound to add ore remove a channel.

#NewScriptBegin ChanSound
 
Dim HStr
 
Sub Load()
  HStr=load("ChanSoundList")
  MakeShortcut "ChanSound", "chansound", "/call AddRemChanSound $(room)", 1
End Sub
 
Sub AddRemChanSound(Text)
  i=InStr(1,HStr,"<"+lCase(Text)+">")
  if i > 0 Then
    HStr=Left(HStr,i-1)+Mid(HStr,i+len(Text)+2)
    print "*** Chan removed"
  else
    HStr=HStr+"<"+lcase(Text)+">"
    if len(HStr) > 1024 Then HStr=Right(HStr,1024)
    print "*** Chan added"
  end if
End Sub
 
Sub Chan_Msg(Text, Nick, Channel, FrameID, ConnID)
  i=InStr(1,HStr,"<"+lCase(Channel)+">")
  if i > 0 Then
    if NotVisible = 1 Then
      '** Play standard sound:
      Beep 2
      '** Or Play an other wave-file:
      'PlayWave "C:\WINDOWS\Media\chimes.wav"
    End if
  End if
End Sub
 
Sub Unload()
  save "ChanSoundList", HStr
End Sub

Eigene Werkzeuge