Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu dieser Vergleichsansicht

nettalk:scripting:chansound [2006/05/12 17:19] (aktuell)
192.168.0.50 angelegt
Zeile 1: Zeile 1:
 +====== ChanSound ======
  
 +Use **right-click > ChanSound** to add ore remove a channel.
 +
 +<code vb>
 +#​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
 +</​code>​

Eigene Werkzeuge