Author Topic: Our topic is...  (Read 2764 times)

TheCellist42

  • Full Member
  • ***
  • Posts: 143
    • TheCellist42.com
Our topic is...
« on: March 19, 2008, 11:03:53 PM »
Sub ONTEXT(Message,Channel,Nickname,Host,ServerNumber)
If Left(Message,7) = "!topic " and Len(Message) > 7 then
If ISOP(Nickname,Channel,ServerNumber)=True then
  If Channel = "#Sam-Ops" then 
  NewTopic = Mid(Message,8)
  SendCommand "/topic " & "#SamF" & " " & NewTopic,ServerNumber
End If
End If
End If
End Sub

I want the topic to state Our topic is: "TOPIC HERE"

Where would I insert "Our topic is:" in this script?

I tried insertng it inside the quotations after /topic but then it included #SamF in the statement, but when I try to put it after the & that is after "#SamF" I get an error. What is wrong?
~ Sam
~ Visit my website at http://www.TheCellist42.com

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Our topic is...
« Reply #1 on: March 19, 2008, 11:12:48 PM »
What error do you get?
Does it change the topic for you?

Also, just use this for SendCommand.

SendCommand "/topic #SamF " & NewTopic, ServerNumber
The IceChat God

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Our topic is...
« Reply #2 on: March 20, 2008, 02:29:47 AM »
I think this is what you want:

Code: [Select]
SendCommand "/topic #SamF Our topic is: " & NewTopic, ServerNumber
"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein

TheCellist42

  • Full Member
  • ***
  • Posts: 143
    • TheCellist42.com
Re: Our topic is...
« Reply #3 on: March 20, 2008, 09:49:22 AM »
Thanks :)

That Works!
~ Sam
~ Visit my website at http://www.TheCellist42.com