SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: IRC color codes

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Sep 2002
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IRC color codes

    I am writing a php IRC web interface and have everything working but the IRC color codes are making things look messy. I would like to get rid of them all together. I know this is very specific but does anyone know how to remove them or stop the server sending them in the first place.

    Cheers

  2. #2
    pie??? PIE!!!! rsdl's Avatar
    Join Date
    May 2001
    Location
    Vancouver, BC Canada
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is just a guess but have you tried str_replac() ? and just replace the colour codes being sent?

    -rsdl

  3. #3
    o_O O_o BlueFire2k5's Avatar
    Join Date
    Mar 2003
    Location
    Sioux Falls, SD
    Posts
    475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In Unreal you can set mode +S in the channel to strip all color codes.
    "Sa souvraya niende misain ye."
    - Robert Jordan, The Wheel of Time

  4. #4
    SitePoint Enthusiast Rahven's Avatar
    Join Date
    Mar 2003
    Location
    In the barrel with the other monkeys.
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Most servers allow a room to have a mode set to strip colors. My other suggestion would be to try to capture the raw encoding before it heads to the server, then strip the codes, as rsdl suggested. Easiest to implement is a channel mode, but that assumes that you're only allowing people to use your interface to connect to your channels.

    The Current RFC for IRC (1459) should contain all the raw numerics you need to grab... if not a search on Google should net you some pretty good leads.

    Hope this helps.

    -Rahven


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •