Author Topic: [Answered] Chr(1) - my error or not working?  (Read 868 times)

0 Members and 1 Guest are viewing this topic.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
[Answered] Chr(1) - my error or not working?
« on: June 30, 2007, 10:39:22 am »
I was looking at Warlord's IRC-Class, and became interested in creating an IRC-Soldat connection. I wanted to see how it worked, so I recreated my own from scratch, but am having one issue when it comes to the IRC messaging in a channel.
I origonally had the command for messaging in the channel being

But I wanted it to be more unique from the other text players say in the channel, so I wanted it to be a '/me ' + Message command, so I had this
Code: [Select]
Chr(1) + 'ACTION ' + Channel + ' :' + MessageAnd it seems to come up with it not a valid command...

My brother did a guess and check and found that Character 1 is the correct character for doing a /me command, although, is he wrong or does pascal not handle Chr(1) properly? Whats going on?[/s]

nevermind, I figured it out...
i need to do this to make it work
PRIVMSG command to message the Chr(1) + 'ACTION ' + Message

(Note, the doesn't work yet its still a button on the BBC Tags)
« Last Edit: June 30, 2007, 10:49:53 am by DorkeyDear »

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: [Answered] Chr(1) - my error or not working?
« Reply #1 on: June 30, 2007, 11:05:42 pm »
I dont think you put chr(1) at the start of the packet... ever...

Offline chrisgbk

  • Moderator
  • Veteran
  • *****
  • Posts: 1739
Re: [Answered] Chr(1) - my error or not working?
« Reply #2 on: July 01, 2007, 01:16:24 pm »
I dont think you put chr(1) at the start of the packet... ever...

Yes, you do; that character code is how you signify that you are using CTCP, which is how you do ACTION commands. (like /me)

Let me correct that; it doesn't go at the start of the packet, it goes at the beginning of the message sent with PRIVMSG. It should also be the last character of the message.
« Last Edit: July 01, 2007, 01:21:08 pm by chrisgbk »