Author Topic: Use of Nicks Command  (Read 5859 times)

Norrdec

  • Newbie
  • *
  • Posts: 6
Use of Nicks Command
« on: November 13, 2006, 03:25:24 PM »
As i have NO exp. in using VB or other scripts I would like to ask for help.

I tried to do this in IC5 style

I wanted to get all nicks from a channel, and message them in that channel with ONTEXT
I wrote a scrip like this:
Code: [Select]
Sub ONTEXT(Message,Channel,Nickname,Host,ServerNumber)
If Message = "!help" then
SendCommand /msg " $ Channel $  Nicks("#oblivion_squadron",ServerNumber) "


And well... it didn't work.
Is there a lot of BS in it...?

Also if someone could show me how would it look like in IC7 style?

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Use of Nicks Command
« Reply #1 on: November 13, 2006, 04:10:15 PM »
Close, but not quite. Your not using SendCommand properly, and your not putting the quotes in the right places.
Also, use the & symbol for joining strings/messages together.


Code: [Select]
Sub ONTEXT(Message,Channel,Nickname,Host,ServerNumber)
If Message = "!help" then
  SendCommand "/msg " & Channel & " " & Nicks("#oblivion_squadron",ServerNumber), ServerNumber
end if
End Sub
The IceChat God

Norrdec

  • Newbie
  • *
  • Posts: 6
Re: Use of Nicks Command
« Reply #2 on: November 13, 2006, 04:12:48 PM »
Thank you.
/edit
Are you sure this is correct...? Its not working on my side.

If I would say !help (after loading the script of course) it should post all the names, and yet it does nothing.
Im really puzzled :|
« Last Edit: November 13, 2006, 04:21:28 PM by Norrdec »

DarkStar

  • Full Member
  • ***
  • Posts: 135
  • Scripts for Praise
    • CorpseCorp
Re: Use of Nicks Command
« Reply #3 on: November 13, 2006, 07:22:38 PM »
Thank you.
/edit
Are you sure this is correct...? Its not working on my side.

If I would say !help (after loading the script of course) it should post all the names, and yet it does nothing.
Im really puzzled :|

the ONTEXT sub does not trigure when you use it.
This message brought to you by the Wonderful Wizard of Oz.

Norrdec

  • Newbie
  • *
  • Posts: 6
Re: Use of Nicks Command
« Reply #4 on: November 15, 2006, 09:46:27 AM »
Well even if someone else says it, it doesn't work.

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Use of Nicks Command
« Reply #5 on: November 15, 2006, 10:23:09 AM »
Well, I am assuming you are doing this in IceChat 7.
When you saved the Script file, since you are using an IceChat 5 style script, you need to change the file type from an IceChat Script, to an IceChat 5 Script.
Choosing file, Save as, lets you choose what type.
I am taking a wild guess, it was saved as the Default Type :)
The IceChat God

Norrdec

  • Newbie
  • *
  • Posts: 6
Re: Use of Nicks Command
« Reply #6 on: November 16, 2006, 07:06:18 AM »
That was it! Thanks ;)