Haggis Posted April 4, 2005 Report Share Posted April 4, 2005 There was a few bugs i fixed like when someone whispered it echoed in main screen instead of whisper i also added it so that it strips the fonts off whispers # *********************************************** # # Xchat Font Stripper for Chats USA # # Coded by Haggis # # 3rd April '05 # # http://www.haggistech.co.uk # # Version 1.1 # *********************************************** # Xchat::register("Split font","0."); Xchat::print("Stripper Loaded\n"); Xchat::print("http://www.haggistech.co.uk\n"); IRC::add_message_handler("PRIVMSG", "say"); sub say { my ( $Nick ) = Xchat::get_info ( 'nick' ); my $line = shift; if($line =~ m/CUSA/) { my $namehost, $prvmsg, $to, $font, $msg, $msg2, $font2; ($namehost, $prvmsg, $to, $font, $msg) = split(/ /, $line, 5); ($name, $host) = split(/!/, $namehost); ($font2, $msg2) = split(/:/,$msg,2); $name =~ s/://; $msg =~ s/://; if($to =~ $Nick) { IRC::command("/query $name"); #make a tab Xchat::print("$name\cC: $msg2", $name, $serv); return Xchat::EAT_XCHAT; }else{ Xchat::emit_print("Private Message to Dialog", $name, $msg2); return Xchat::EAT_XCHAT; } } return Xchat::EAT_NONE; } enjoy Link to comment Share on other sites More sharing options...
Jupiter Posted April 5, 2005 Report Share Posted April 5, 2005 works great for me thanks now to learn how to use perl... Link to comment Share on other sites More sharing options...
Ziggy Posted April 9, 2005 Report Share Posted April 9, 2005 (edited) And here's my new-and-improved version: #!/usr/bin/perl # *********************************************** # # Xchat Font Stripper for Chats USA # # Coded by Haggis # # 3rd April '05 # # http://www.haggistech.co.uk # # Version 1.1-Zg # # *********************************************** # # Modified by Ziggy <[email protected]> ############################ # Bugs Fixed: # - Messages with "CUSA" in them but not at the beginning would not parse properly # - Missing tab in the "whisper" output stuff (so now the bar that lets you move the nicks over works) # - the script shouldn't run on servers that aren't CUSA # - added the #!/usr/bin/perl for distros that won't run the file without it # - formatted the code # - added a * before the launch info # - changed the script name to CUSA Font Stripper, and the 0. version to 1.1-Zg Xchat::register("CUSA Font Stripper","1.1-Zg"); Xchat::print("* ChatsUSA Font Stripper Loaded\n"); Xchat::print("* http://www.haggistech.co.uk\n"); IRC::add_message_handler("PRIVMSG", "say"); sub say { my ( $Nick ) = Xchat::get_info ( 'nick' ); my ( $Server ) = Xchat::get_info ( 'server' ); my $line = shift; # Verify they're on ChatsUSA (really, not that important, # but could prevent possible "hidden messages" on other networks, # which may or may not be a breach of security [i.e. if you're a # sysop, it probably would be bad if two skiddies were fighting # in a hidden CUSA font code thing and you didn't know it]) # Also increases script efficiency by 0.0000059%. -Zg if($Server =~ m/^CUSA.Server/) { # remember, the "whole line" is returned here. need to parse it some so # messages can't be hidden by throwing "CUSA" in there somewhere. # parse this ahead of time. my $namehost, $prvmsg, $to, $font, $msg, $msg2, $font2; ($namehost, $prvmsg, $to, $font, $msg) = split(/ /, $line, 5); if($font =~ m/^:CUSA/) { ($name, $host) = split(/!/, $namehost); ($font2, $msg2) = split(/:/,$msg,2); $name =~ s/://; $msg =~ s/://; if($to =~ $Nick) { IRC::command("/query $name"); #make a tab Xchat::print("<$name\cC>\t$msg2", $name, $serv); return Xchat::EAT_XCHAT; }else{ Xchat::emit_print("Private Message to Dialog", $name, $msg2); return Xchat::EAT_XCHAT; } } return Xchat::EAT_NONE; } } Edited April 9, 2005 by Ziggy Link to comment Share on other sites More sharing options...
Haggis Posted April 10, 2005 Author Report Share Posted April 10, 2005 Well this has really annoyed me # Verify they're on ChatsUSA (really, not that important, # but could prevent possible "hidden messages" on other networks, # which may or may not be a breach of security [i.e. if you're a # sysop, it probably would be bad if two skiddies were fighting # in a hidden CUSA font code thing and you didn't know it]) # Also increases script efficiency by 0.0000059%. -Zg Not important taking it no sysops use it The qwhisper thing there was nothing wrong with that and lastly i said i would fix this when i got back but no someon has to do ti first the first script i write for xchat while learning perl and someone goes and changes it for me CHEERS Link to comment Share on other sites More sharing options...
Guest Seph Posted April 10, 2005 Report Share Posted April 10, 2005 yawns Link to comment Share on other sites More sharing options...
Haggis Posted April 10, 2005 Author Report Share Posted April 10, 2005 The Whisper bit was fixed on mine just not released and seph i dont see what the need for that post was lol expect an update in the code in thr next few days Link to comment Share on other sites More sharing options...
TG007 Posted April 10, 2005 Report Share Posted April 10, 2005 I believe he should have said something to you before he went and did that. As for his motives for doing it one can only hope his intentions were to help users. Ziggy has alot of talent in that area so it's nice he is taking the time to help users that prefer xchat. We thank you both very much for your contributions. Look forward to your next update haggis. Link to comment Share on other sites More sharing options...
Ziggy Posted April 11, 2005 Report Share Posted April 11, 2005 Well this has really annoyed me # Verify they're on ChatsUSA (really, not that important, # but could prevent possible "hidden messages" on other networks, # which may or may not be a breach of security [i.e. if you're a # sysop, it probably would be bad if two skiddies were fighting # in a hidden CUSA font code thing and you didn't know it]) # Also increases script efficiency by 0.0000059%. -Zg Not important taking it no sysops use it The qwhisper thing there was nothing wrong with that and lastly i said i would fix this when i got back but no someon has to do ti first the first script i write for xchat while learning perl and someone goes and changes it for me CHEERS Haggis, the intention is if you're a sysop on another network, or a chanop/chanowner on another network. Because the bug will still be there if you're a chanop/sysop/chanowner on CUSA (there's really no way around it...). It supresses parsing unless you're on CUSA so users on other networks can't hide messages from you. And anyways, I fixed it in my version (including the annoying "if you say CUSA, it'll try and parse it" bug), and figured I'd help everyone else by posting my changes. Sheesh. You know just about as much Perl as I do, so don't get mad about it . Link to comment Share on other sites More sharing options...
Haggis Posted April 11, 2005 Author Report Share Posted April 11, 2005 its not the point i said i would fix it when i got back Xchat Font Stripper Link to comment Share on other sites More sharing options...
Ozzy10 Posted April 13, 2005 Report Share Posted April 13, 2005 Topic closed to get the font stripper please see the downloads section Link to comment Share on other sites More sharing options...
Recommended Posts