Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

listening to all channels at once?

Aniam Ingmann
llOwnage(float pwnage);
Join date: 22 Oct 2005
Posts: 206
10-15-2007 15:43
I'm trying to make a listener that listens to all the channels at once, it's turned on by a link message from another script in the object. How would i make it so that it listens for all channels and relays it back to the owner? I have this so far, but i'm not sure what to do. Should i maybe just take out the llListen function and just leave a:
CODE

default
{
listen(integer c, string n, key id string msg)
{
if (c != 0)
{
llOwnerSay(msg);
}
}
}


here's the script i have so far.

CODE

default
{
on_rez(integer start_params)
{
llResetScript();
}
link_message(integer sender_num, integer num, string str, key id)
{
if (str == "listenall")
{
llListen("","",NULL_KEY,"");//no idea what to put for the channel section?
}
}
listen(integer c, string n, key id, string msg)
{
if (c != 0)
{
llOwnerSay(msg);
}
}
}
_____________________
From: someone

Don't worry, Aniam is here!
- Noob
Malachi Petunia
Gentle Miscreant
Join date: 21 Sep 2003
Posts: 3,414
10-15-2007 15:52
Unpossible.

The one argument to llListen() that cannot take a wildcard is the channel. If you could, you would likely not even begin to parse all the intercepted traffic.

There are ways to scan through all 4.3 billion channels, but they are both slow and lagarific.
Aniam Ingmann
llOwnage(float pwnage);
Join date: 22 Oct 2005
Posts: 206
10-15-2007 16:27
well the thing is, i've had tools that do it... so it's definitely possible. I just don't understand how. :/
_____________________
From: someone

Don't worry, Aniam is here!
- Noob
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
10-15-2007 17:28
From: Aniam Ingmann
well the thing is, i've had tools that do it... so it's definitely possible. I just don't understand how. :/


You can listen to more than one channel at a time by creating a listen for each separate channel. But I doubt that your tools listened to all 4 billion of them.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
10-15-2007 18:12
CODE

integer chan = 0;
default
{
state_entry()
{
llSetTimerEvent(1.0);
}
timer()
{
state scan;
}
}
state scan
{
state_entry()
{
if(chan == 2147483647)
{
llOwnerSay("Wake up you old fart! We need to start on the negative channels now");
}
llListen(chan, "", NULL_KEY, "" );
llSetTimerEvent(1.0);
}
listen(integer channel, string name, key id, string message)
{
llSetTimerEvent(15.0);//Something on this channel get the
//messages and say them until there is a 25 second break
llOwnerSay(message);
}
touch_start(integer total_number)
{
state default;
}
timer()
{
chan++;
state default;
}
}
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Siann Beck
Beauty & Braiiiiinsss!
Join date: 14 Jul 2007
Posts: 140
10-15-2007 18:24
Hey, cool! Now you can quickly scan the entire chat spectrum in only 136 years! Unless, of course, you happen to pick up something, in which case it will take longer.
Malachi Petunia
Gentle Miscreant
Join date: 21 Sep 2003
Posts: 3,414
10-15-2007 18:29
Cool, I always wanted a program with a best case time of 76 years and a worse case time of 1100 years, I'm getting more patient in my later years. And it doesn't even handle the negative channels.

:)
:o <- beaten punchline smiley added
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
10-15-2007 19:11
Guess I should have made it sing one verse from "99 Bottles of Beer on the Wall" every 2 years so it won't be so boring.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Siann Beck
Beauty & Braiiiiinsss!
Join date: 14 Jul 2007
Posts: 140
10-15-2007 20:41
From: RJ Source
You can listen to more than one channel at a time by creating a listen for each separate channel. But I doubt that your tools listened to all 4 billion of them.

I don't about you, but that sounds like a challenge. Just how many channels *can* a script listen to at once? As it turns out, 65, after which you get a script error "Too Many Listens". So it turns out your object would only need a little over 66 million scripts to listen to the entire chat spectrum at once. Of course, somewhere along the line there, the sim would crash. I got up to 650 before I chickened out. If someone has a sim they don't mind crashing, they might want to test further.

CODE

default
{
state_entry() {
integer ch = 0;
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
llListen(++ch, "", NULL_KEY, "");
}

listen (integer intChannel, string strName, key keySpeaker, string strMessage) {
llOwnerSay((string)intChannel + ": " + strMessage);
}
}
Stephen Zenith
Registered User
Join date: 15 May 2006
Posts: 1,029
10-16-2007 03:20
I might try it when I get another island - no date for that yet though.
_____________________
Aniam Ingmann
llOwnage(float pwnage);
Join date: 22 Oct 2005
Posts: 206
10-16-2007 03:34
I'm so confused then.. I don't understand how they did it :/ Because i can talk in any channel and it listens to it.
_____________________
From: someone

Don't worry, Aniam is here!
- Noob
Stephen Zenith
Registered User
Join date: 15 May 2006
Posts: 1,029
10-16-2007 03:35
From: Aniam Ingmann
I'm so confused then.. I don't understand how they did it :/ Because i can talk in any channel and it listens to it.


Did you try channel 6325994? How about -14794762?
_____________________
Siann Beck
Beauty & Braiiiiinsss!
Join date: 14 Jul 2007
Posts: 140
10-16-2007 07:52
I came up with an enhancement to my script. Rather than have to manually enter the starting channel in each one, replace line 4:

integer ch = 65 * (integer)(llGetSubString(llGetScriptName(), 9, -1));

Assuming, of course, that your script name is 8 characters long (I named it ListenUp).
Kidd Krasner
Registered User
Join date: 1 Jan 2007
Posts: 1,938
10-16-2007 08:04
From: Siann Beck
I came up with an enhancement to my script.

Reducing all those llListen calls to a single one, inside a loop, would be the obvious enhancement to start with.
Malachi Petunia
Gentle Miscreant
Join date: 21 Sep 2003
Posts: 3,414
10-16-2007 08:17
From: someone
Reducing all those llListen calls to a single one, inside a loop, would be the obvious enhancement to start with.
The loop would add excess bytecode overhead which would twart the goal of hammerring as hard as possible on the simulator. :p
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
10-16-2007 10:06
Even if you *could*, you *shouldn't*. (Notable exception: debug tool.)