Project

General

Profile

Support #3789

How to strip color from messages using C# and API V2?

Added by Samuel Proulx over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Api
Target version:
Start date:
01/25/2018
Due date:
% Done:

0%

Estimated time:
Operative System:
All

Description

I must be missing something. I know $strip exists for scripts. However, what/where/how is the method for those of us writing plugins in C# to strip formatting from an IRC message? I need to pass in a string, and get a returned string without color codes.

History

#1

Updated by Per Amundsen over 1 year ago

  • Status changed from New to Assigned

It seems I forgot to add the strip API's when I converted from V1, I will add them for next beta, for now you can use $strip through this API https://adiirc.github.io/apiv2/generated/html/f31933b4-7d1a-a5f4-bbf1-19be23ab3c30.htm

Example:

string text = "bla bla";
text = host.ActiveIWindow.Evaluate("$strip(" + text + ")", "");
#2

Updated by Per Amundsen over 1 year ago

  • Status changed from Assigned to Resolved

Added for next beta.

#3

Updated by Per Amundsen over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF