Shoutbox

[Request] BB code to IRC code and vice versa - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [Request] BB code to IRC code and vice versa (/showthread.php?tid=66806)

[Request] BB code to IRC code and vice versa by Jimbo on 09-30-2006 at 12:24 PM

I have just thought of an excellent idea for a script
This script should be a window that lets you copy and paste bb colour code into it and then you click something like convert, and it converts it to IRC colour code
Is this possilbe and will someone make it?


RE: [Request] BB code to IRC code by NanaFreak on 09-30-2006 at 12:27 PM

yes i will get on to it asap for you :D im quite sure it will be easy


RE: [Request] BB code to IRC code by ins4ne on 09-30-2006 at 12:40 PM

great idea :D why didnt anybody think of that?


RE: [Request] BB code to IRC code by NanaFreak on 09-30-2006 at 12:43 PM

i will get striaght on in for all you guys :D after i do the hard part for Caps and Full Stops (134jimbodude i think it shouldnt be your script but a combined ok?)


RE: [Request] BB code to IRC code by Spunky on 09-30-2006 at 02:53 PM

quote:
Originally posted by ins4ne
great idea, why didnt anybody think of that?

I have actually made something for this already and it is included in the PSM+ script :D There is also an entire thread about this, started by me from around the time I did it :p

EDIT:
code:
for(a=0;a<=99;a++){
myString = myString.replace(new RegExp("\\[c="+a+"\\]",'gi'),"·$"+a+" ");
myString = myString.replace(/\[\/c\]/g,'·$');
}

Just need to add support for people using hex codes rather than just numbers ;)

(Also, make sure it only reads first 6 digits from hex code :p)
RE: [Request] BB code to IRC code by Jimbo on 09-30-2006 at 03:24 PM

yes, i use hex numbers(thanks jay_jay) as i have a kind of 'gradient' in my name. I hope this new script jay_jay is working on will have suppport for hex numbers.


RE: [Request] BB code to IRC code and vice versa by ins4ne on 09-30-2006 at 07:44 PM

hows the development? :)


RE: [Request] BB code to IRC code and vice versa by Spunky on 09-30-2006 at 07:48 PM

quote:
Originally posted by 134jimbodude
yes, i use hex numbers(thanks jay_jay) as i have a kind of 'gradient' in my name

Gradients are possible with BBcode... In fact, it should be exactly the same method. I would just use BBCode (if the colours aren't an exact match then fair enough, but I'd still do it anyway)
RE: [Request] BB code to IRC code and vice versa by Jimbo on 10-04-2006 at 04:28 PM

i just heard from jay_jay that he probably can't do the script. Can anyone else have a go?


RE: [Request] BB code to IRC code and vice versa by vikke on 10-04-2006 at 04:36 PM

Simple!

code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
Message.replace("[/C]", "");
Message.replace("]", "");
Message.replace("[C=", "");
}

Not working with gradients though..
RE: [Request] BB code to IRC code and vice versa by Spunky on 10-04-2006 at 05:01 PM

quote:
Originally posted by vikke
Simple!
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
Message.replace("[/C]", "");
Message.replace("]", "");
Message.replace("[C=", "");
}

Not working with gradients though..

Message.replace will only replace the first instance of the string, not the others... (probably the reason for not working with gradients :p)

code:
for(a=0;a<=99;a++){
myString = myString.replace(new RegExp("\\[c="+a+"\\]",'gi'),"·$"+a+" ");
myString = myString.replace(/\[\/c\]/g,'·$');
}
will work though

Converting IRC to BB will be harder though as IRC has not got a close tag (unless they use ·$ which is unlikely), which is required for it to work :p
RE: [Request] BB code to IRC code and vice versa by Jimbo on 10-04-2006 at 05:48 PM

Also, that won't work with nicknames though, will it?


RE: [Request] BB code to IRC code and vice versa by Spunky on 10-04-2006 at 05:49 PM

In what way won't it work with nicknames?


RE: [Request] BB code to IRC code and vice versa by Jimbo on 10-04-2006 at 05:56 PM

that will only replaces messages won't it. not WLM names.
(or am i just being stupid lol)


RE: [Request] BB code to IRC code and vice versa by Spunky on 10-04-2006 at 05:58 PM

You make a script that retireves your name (and PSM...) and convert the tags and then set that as your new name... it is possible :p


RE: [Request] BB code to IRC code and vice versa by Jimbo on 10-04-2006 at 06:08 PM

lol yes, but hard?


RE: [Request] BB code to IRC code and vice versa by Spunky on 10-04-2006 at 06:10 PM

Not really...

code:
myString = Messenger.MyName;
for(a=0;a<=99;a++){
myString = myString.replace(new RegExp("\\[c="+a+"\\]",'gi'),"·$"+a+" ");
myString = myString.replace(/\[\/c\]/g,'·$');
}
Messenger.MyName = myString;


:p