This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Best idea(s) of the millenium!

Old posts that have not been replied to for several years.
User avatar
Yourname
Master
Posts: 358
Joined: Mon Sep 24, 2001 8:00 pm
Location: Toronto

Post by Yourname »

heh,
As usual, Yourname is back with ideas.
/me feels l33t to get gr8 ideas like these.. but lame for not being able to materialize them :sad:

Well anywayz here it is :-
On DALnet, when a user joins, he identifies to his nickname. And when you do a /whois on the user you get output like..
Yourname is yourname@wants.to.dance.with.y0u.org * I Liké tô Bé a Kid.
Yourname on @#dragonshelp @#eggdrop @#idle.com @#yourname
Yourname using twisted.ma.us.dal.net Global NAPs - Quincy, MA
Yourname has identified for this nick
Yourname has been idle 50mins 28secs, signed on Sat Dec 01 13:23:14
yourname End of /WHOIS list.
Notice the 'identified' part? Well, this is what is gonna be used by the bot.
What i want the bot to do is, I just add a user by nick, (we will need a separate flag for this too) Ex:

.adduser !bla
.chattr bla +Bv (B,a custom flag)

Ok?..

Now what eggdrop has to do is, when bla enters the channel, it has to do a /whois on bla and find out whether bla has identified or not, it's searching for the word 'identified' .. if bla hasnt identified yet, it'll not voice it (the +v is also there) And then we can even set it to check for a number of times in a set time of interval.. and then give up, if bla has still not identified.
This way we will save up to add idiotic users who know how to CHAT... but dont know any commands IRC/Eggdrop.
I also think this is a bit CPU intensive.. But it can be made to do a lot of other things, this is just the basic idea to make a point. Well, that wuz for scripting a TCL script.

Err.. and i also had another suggestion to eggdev. Im not sure whether this has been previously brought up, but if it wuz, please ignore it.

When we have TCL errors in the partyline..

Code: Select all

[13:13] TCL error [repeat_action]: no value given for parameter "text" to "repea
t_action"   
My suggestion is, cant we make it a bit more precise like instead of just giving the proc name, can there be a way to add the filename?
Im sure there are ways, but if cant be done, i'd like to be enlightened about the facts i overlooked.

As for the TCL scripting suggestion, get those brains into it guyz.. i know its a good one :wink: hehehe


Dormant egghead.
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

re your second query. no, it can't output the filename. once a script is loaded, it doesn't have any identifiers with the filename it was from, it just exists as procs, namespaces, binds, timers and varables, and nothing else.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

As Petersen said, once the "source" command is used to load the script, the memory that it is stored in, acts like one large script.

As for the first idea. We would need to know the RAW numeric used by the server, to send the data back.
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

307
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Somthing else I should have asked, but what does the server send if the person is not identified.
User avatar
Yourname
Master
Posts: 358
Joined: Mon Sep 24, 2001 8:00 pm
Location: Toronto

Post by Yourname »

Well, the 'identified' will be missing :smile:
Dormant egghead.
User avatar
Yourname
Master
Posts: 358
Joined: Mon Sep 24, 2001 8:00 pm
Location: Toronto

Post by Yourname »

seems like the second idea aint possible. well, isnt there a way to code it into eggdrop and ADD this functionality?
Dormant egghead.
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

The problem with the 1st idea is that the server doesn't send a numeric when a nick isn't identified. In fact, it doesn't always send one if a nick IS identified. And, due to server lag, etc, you can't really base something on the condition that something diddn't happen, you need 2 conditions. That may have not made sence, but oh well, I'm tired :smile:
User avatar
Yourname
Master
Posts: 358
Joined: Mon Sep 24, 2001 8:00 pm
Location: Toronto

Post by Yourname »

Well, Why do we need to keep waiting for a numeric?

Why cant we do something like output the result of /whois $nick to a temp file. And then make eggdrop search for the particular string, in this case 'identified' and do what we want it to do. (which i already told what shud be done in my main post)

Regards lag, we can think of it later. Right now the main concept can be done. Lags, splits can come up later :wink:
Dormant egghead.
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

While my knowledge of dalnet is severly limited, I recall that you could ask nickserv if a user was registered with the /nickserv ACC $nick command, to which it would reply with a notice what access level the user was at (something like 0 for unregistered nick, 1 for not real owner, 2 for hostmask matching for the nick, and 3 for password identified. - check with nickserv help if I'm right about that). It would be better to use nickserv for this application because #1 thats what it this command was designed for, and #2 it always returns an answer, unlike the whois method which has the numeric missing if it aint identified.
User avatar
Yourname
Master
Posts: 358
Joined: Mon Sep 24, 2001 8:00 pm
Location: Toronto

Post by Yourname »

DAMN! yeah man!! Exactly!

LOL... i almost forgot that services can be of help too! :wink:
Well, there ya go guys.. that brings a very good turn now.
Dormant egghead.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

I already wrote a script like that

http://home.dal.net/stdragon/eggdrop/hasidentified.tcl

It works like this..

Code: Select all

proc mycallback {nick ident} {
  if {$ident == 1} {
    # has identified
  } else {
    # hasn't identified
  }
}

hi_check stdragon mycallback
User avatar
Yourname
Master
Posts: 358
Joined: Mon Sep 24, 2001 8:00 pm
Location: Toronto

Post by Yourname »

I saw that script, but i didnt get much of a head & tail of it :razz: But i take it that it'll need 2 more scripts to work properly from your site.

Anyways, the foundation is set, thanks to stdarg, now its for the contruction and the finishing ceremony!

All the best :smile:
Dormant egghead.
User avatar
Yourname
Master
Posts: 358
Joined: Mon Sep 24, 2001 8:00 pm
Location: Toronto

Post by Yourname »

I hope there is someone following this...
Dormant egghead.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Code: Select all

array set nickarray {}

bind join - "*" chk:join
proc chk:join {nick uh hand chan} {
  global nickarray
  lappend nickarray([string tolower $nick]) $chan
  hi_check $nick cb:voice
}
proc cb:voice {nick x} {
  global nickarray
  foreach chan $nickarray($nick) {
    if {(![isop $nick $chan]) && (![isvoice $nick $chan]) && ([onchan $nick $chan])} {
      pushmode $chan +v $nick
    }
    set nickarray($nick) [lrepleace $nickarray($nick) [set idx [lsearch -exact $nickarray($nick) "$chan"]] $idx]]
  }
}
bind time - "*" chk:time
proc chk:time {min hour day month year} {
  global nickarray
  set min [string trimleft $min 0]
  if {![expr $min % 5]} {
    foreach chan [channels] {
      foreach nick [chanlist $chan] {
        if {(![isop $nick $chan]) && (![isvoice $nick $chan])} {
          hi_check $nick cb:voice
          lappend nickarray([string tolower $nick] $chan
        }
      }
    }
  }
}
This isn't tested, nor fine tuned. It acts for all channels, and check all channels for no-voices every 5 mins.

You should load the script by stdarg first, then this.
Locked