Author Topic: !topic Again...HELP  (Read 6515 times)

TheCellist42

  • Full Member
  • ***
  • Posts: 143
    • TheCellist42.com
!topic Again...HELP
« on: March 02, 2008, 08:55:48 PM »
Hey Everyone, Im Using This Script To Change The Topics...

on 1:TEXT:!topic *:#SamF:/topic $chan "$message"

It Works Great, Except, It Includes !Topic in the topic, anyone know what is wrong?

Also, Do You Have Status and Message Scripts...

Like,

TOPIC Goes Here / STATUS Goes Here / MESSAGE Goes Here

(!topic, !status, !Message)

If Not, Fine, But Can You Help Me With The Topic Script?

-TheCellist42  :-)
~ Sam
~ Visit my website at http://www.TheCellist42.com

BigRed

  • Guest
Re: !topic Again...HELP
« Reply #1 on: March 02, 2008, 10:15:15 PM »
the problem is that there is !topic in your "$message" as far as the script is concerned. doing !topic is just a much work as doing /topic so wouldn't it make sense just to lift +t or whatever it is on your net and let them set it the normal way?

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: !topic Again...HELP
« Reply #2 on: March 03, 2008, 12:19:01 AM »
Code: [Select]
Sub ONTEXT(Message,Channel,Nickname,Host,ServerNumber)
If Left(Message,7) = "!topic " and Len(Message) > 7 then
  NewTopic = Mid(Message,8)
  SendCommand "/topic " & Channel & " " & NewTopic,ServerNumber
End If
End Sub

You need to save it as .ice not .ics
"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: !topic Again...HELP
« Reply #3 on: March 03, 2008, 01:43:39 PM »
Thanks  :-)
~ Sam
~ Visit my website at http://www.TheCellist42.com

TheCellist42

  • Full Member
  • ***
  • Posts: 143
    • TheCellist42.com
Re: !topic Again...HELP
« Reply #4 on: March 04, 2008, 09:56:34 PM »
Anything I Can Add To The Script To Make It Be Able To Be Triggered By Ops / HalfOps Only?
~ Sam
~ Visit my website at http://www.TheCellist42.com

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: !topic Again...HELP
« Reply #5 on: March 05, 2008, 12:13:08 AM »
use this, it returns true or false ISOP(Nickname,Channel,ServerNumber)

and for halfops: ISHALFOP(Nickname,Channel,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: !topic Again...HELP
« Reply #6 on: March 05, 2008, 03:08:54 PM »
This Is What I Got

ERROR:modScriptFunctions:Topic.ice:Function:LoadScriptFile: Error Number:1044 : Cannot use parentheses when calling a Sub
~ Sam
~ Visit my website at http://www.TheCellist42.com

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: !topic Again...HELP
« Reply #7 on: March 05, 2008, 03:12:15 PM »
Check some of the other scripts and see how it was implemented how to check for ops.
You simply did not script the code correctly.
The IceChat God

TheCellist42

  • Full Member
  • ***
  • Posts: 143
    • TheCellist42.com
Re: !topic Again...HELP
« Reply #8 on: March 05, 2008, 03:17:55 PM »
Ok
~ Sam
~ Visit my website at http://www.TheCellist42.com

TheCellist42

  • Full Member
  • ***
  • Posts: 143
    • TheCellist42.com
Re: !topic Again...HELP
« Reply #9 on: March 05, 2008, 09:21:04 PM »
Im A Total Scripting n00b. I have no Idea what Im Doing In IceChat5 scripts. Ive searched the website, and can't find how to add these things in the script...this is what I have, where did I mess it up?

Sub ONTEXT(Message,Channel,Nickname,Host,ServerNumber)
If Left(Message,7) = "!topic " and Len(Message) > 7 then
  IfISOP(Nickname,Channel,ServerNumber)=True then
  IfISHALFOP(Nickname,Channel,ServerNumber)=True then
  NewTopic = Mid(Message,8)
  SendCommand "/topic " & Channel & " " & NewTopic,ServerNumber
End If
End Sub

??  :?
~ Sam
~ Visit my website at http://www.TheCellist42.com

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: !topic Again...HELP
« Reply #10 on: March 05, 2008, 11:35:47 PM »
Its an  If statement, you need a space between IF and ISHALFOP and ISOP.
You also need 2 extra END IF statements, just put 2 more below the one ya got.
The IceChat God

TheCellist42

  • Full Member
  • ***
  • Posts: 143
    • TheCellist42.com
Re: !topic Again...HELP
« Reply #11 on: March 06, 2008, 02:12:35 PM »
Thanks For All The Help Snerf
~ Sam
~ Visit my website at http://www.TheCellist42.com

TheCellist42

  • Full Member
  • ***
  • Posts: 143
    • TheCellist42.com
Re: !topic Again...HELP
« Reply #12 on: March 06, 2008, 02:27:10 PM »
and Morio  :-)
~ Sam
~ Visit my website at http://www.TheCellist42.com