• Home
  • Servers
  • Chat
  • Channels
  • Commands
  • Forum
  • FAQ
  • Software
  • Quotes
Topic Options
Rate This Topic
#4167 - 02/01/09 11:00 AM Channel Message Text Event
Duffy Offline
n00b

Registered: 03/18/08
Posts: 5
Loc: 127.0.0.1
Hey, I'm trying to get it so that my Channel messages appear as (<userstatus><nick>!<ident>@<host>)<message>

I Found this script

Code:
__module_name__ = "Channelevent"
__module_description__ = "Channelevent"
__module_version__ = "1.0"

import xchat

def channel_message_hook(word, word_eol, userdata):
   speaker = word[0]
   clean_speaker = xchat.strip(speaker)
   host, prefix = None, ''
   for user in xchat.get_list('users'):
      if xchat.nickcmp(clean_speaker, user.nick) == 0:
         host = user.host
         prefix = user.prefix
         break
   
   if host:
      xchat.emit_print('Channel Message',
            "%s!%s" % (speaker, host), word[1], prefix, '')
      return xchat.EAT_XCHAT
   else:
      return xchat.EAT_NONE

xchat.hook_print('Channel Message', channel_message_hook)


But it makes the Channel messages Repeat Twice Anybody got any idea how to fix this?

Top
Sponsored Links
Sponsored Links
Member
*****

Registered: 27/08/04
Posts: 10136
Loc: Mountain View, CA
Top
#4728 - 04/07/09 11:30 PM Re: Channel Message Text Event [Re: Duffy]
Towlie Offline
n00b

Registered: 04/07/09
Posts: 2
Loc: San Antonio, TX
That would have to be due to that the xchat script is not eating the extra print forrectly. I don't know python sorry.

Top
#5974 - 02/08/11 11:41 AM Re: Channel Message Text Event [Re: Towlie]
kamo Offline
n00b

Registered: 02/08/11
Posts: 2
Loc: TH
Thanks for the info.
_________________________
Singaporeans will be in charge. Holiday Palace is very expensive, while foreigners can. Holiday Palace free

Top
#5988 - 04/28/11 05:51 AM Re: Channel Message Text Event [Re: kamo]
stoneco Offline
n00b

Registered: 04/28/11
Posts: 1
Loc: Country

This website's really the best.
_________________________
yulgang yulgang

Top


Moderator:  mandy