Everything2
Near Matches
Ignore Exact
Full Text
Everything2

edev: EDB tossing users

created by sleeping wolf

(idea) by sleeping wolf (2.6 wk) (print)   ?   (I like it!) Tue May 01 2001 at 14:59:26

As we edevites had been discussing in group messages, it would be nice to offer more room support. I thought it would be a good idea to allow the gods the ability to toss a user into another room. A few minutes produced this code, which should do the trick. It modifies the message opcode. I have included line numbers and code around where I would insert it to indicate how to insert this code.
164: } elsif($isRoot and $message =~ /^\/macro\s+(.*?)/) {
165:
166: htmlcode('doChatMacro', $message);
167:
     } elsif($isRoot and $message =~ /^\/toss\s+(\S*)\s+(.+)/) {
        my $user = $1;
        my $destroom = $2;
        my $R = getNode($destroom, 'room');
        my $BORG = getNode('EDB', 'user');
        my $U = getNode ($user, "user");
        $user =~ s/\_/ /gs;
        $U = getNode($user, 'user') unless $U;

        unless($R) {
            $DB->sqlInsert('message', {msgtext => "Can't move 'em, $destroom doesn't exist on this system!", author_user => getId(getNode('root','user')), for_user =>getId($USER) });
            return;
        }

        if($reason) {
            $DB->sqlInsert('message', {msgtext => 'I tossed you into ' . $destroom, author_user => getId(getNode('EDB','user')), for_user =>getId($U) });
        }
        unless($U) {
            $DB->sqlInsert('message', {msgtext => "Can't move 'em, $user doesn't exist on this system!", author_user => getId(getNode('root','user')), for_user =>getId($USER) });
            return;
        }

        my $message = "/me has thrown [$user] into [$destroom]. ";

        my @EDBURSTS = (
        "[$user] is good exercise!", "[$user] was heavy!",
        "Don't be like [$user].", "[$user] was annoying me!", '[EDB] needed that!', 
        'stale noder flesh'
        );
        $message .= $EDBURSTS[int(rand(@EDBURSTS))];

        my $V = getVars ($U);
        $$V{in_room} = $destroom;
        setVars($U, $V);
 
        my $OTHERUSERS = getNode('other users', 'nodelet');
        $$OTHERUSERS{nltext} =  Everything::HTML::parseCode($$OTHERUSERS{nlcode}, $OTHERUSERS);
        updateNode ($OTHERUSERS, -1);

        $DB->sqlInsert('message', {msgtext => $message, author_user => getId($BORG), for_user => 0, room => $$USER{in_room}});

168: } else {
169:   unless($$VARS{publicchatteroff}) {
170:
171:     #return unless $$USER{title} eq 'nate';
172:     $DB->sqlInsert('message', {msgtext => $message, author_user => getId($USER), for_user => 0, room => $$USER{in_room}});
173:   }
174: }

printable version
chaos

edev: mapping the nodegel edev edev: Writeuptype bugs, or how nate got stuck between two parentheses Gas cap
What color are my eyes? I would like to sit in a coffee shop with a notebook, two pens, a carton of cigarettes, and you Everything2 Easter Eggs Seyen
edev: EDEV FAQ foundations Borg Semantic markup Jelly Bellys
Network user The Raven (The Edgar Allan Porn version) Chatterbox EDB reads his Message Inbox
Cardoon Mild swear words dselect Bob Holness
semicolon Pink Drink EDB
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
What you are reading:
I like the way he reads poetry
The Two Cultures
food poisoning
Oh boner, you didn't whiz on Old Glory, did you?
Packing for Antarctica
Coffee
Decrying political correctness without an understanding of its causes and intended consequences is little more than racism muttered under one's breath
Dissertation defense
Super Mario Brothers
Don't be sexy. I said stop that.
On being sane in insane places
Creating a password to convince yourself you have traveled back in time
When being chased by CIA trainees, don't mention Belgium to the waffle house physicist
New Writeups
Aerobe
Watch out for falling meat(poetry)
C-Dawg
Beelzebub has a devil put aside for me(fiction)
Pavlovna
My Better Half(fiction)
kanoodle
Molson muscle(essay)
aneurin
You pays your money and you takes your choice(idea)
shaogo
July 20, 2008(log)
Glowing Fish
Tualatin River(place)
The Jacket
Words of Advice(idea)
John_Fox
Good Intentions Gone Wrong(person)
Heitah
Posthumous Oscar(thing)
ignis_glaciesque
University of South Florida(place)
ignis_glaciesque
Flogstaskriket(idea)
liveforever
Caesar's last breath(idea)
dagnyswaggart
she wants to believe(personal)
antigravpussy
he doesn't know, but her eyes widen too far(thing)
This page courtesy of The Everything Development Company