Dies ist eine alte Version des Dokuments!


TopicView

#NewScriptBegin TopicView
 
Dim TempFrID
 
Sub Load()
  RegEvent 332, 0
  TopicList("0")=""
  RegEvent 332, 0
End Sub
 
Sub Serv_RegedEvent(EventID, Sender, ConnID, Text, RawData)
  Dat=RemColors(Text)
  if Len(Dat)> 64 Then Dat=Left(Dat,61)+"..."
  TopicList(Split(RawData,4))=Dat
  if TempFrID=FrontFrameID Then ShowInfo Dat, valcText, 0, 0, 16
  if GetCaption(TempFrID)=Split(RawData,4) Then
    SkipEvent
    TempFrID=0
  end if
End Sub
 
Sub FrameChange(OldFrameID, NewFrameID)
  if GetFrameType(NewFrameID)=0 Then
    Dat=TopicList(GetCaption(NewFrameID))
    ShowInfo GetCaption(NewFrameID)
    if Len(Dat)=0 Then
      TempFrID=NewFrameID
      Send "/topic " & GetCaption(TempFrID), TempFrID
      ShowInfo ""
    else
      ShowInfo Dat, valcText, 0, 0, 16
    end if
  else
    ShowInfo ""
  end if
End Sub
 
function RemColors(Text)
  TextNoColor=""
  i=0
  Do
    i2=i
    i=InStr(i2+1, Text, Chr(2))
    i4=InStr(i2+1, Text, Chr(3))
    if (i4<i or i=0) and i4>0 Then i=i4
    i3=i
    if i = 0 Then
      i=Len(Text)+1
      i3=i
    else
      Do
        i=i+1
        Dat=Mid(Text, i, 1)
      Loop until (Asc(Dat) > 57 or Asc(Dat) < 48) and Dat<>","
      i=i-1
    end if
    if i3-i2 > 1 Then TextNoColor=TextNoColor+Mid(Text, i2+1, i3-i2-1)
  loop until i3=Len(Text)+1
  RemColors = TextNoColor
End function

Eigene Werkzeuge