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.

identify nick random

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
abah
Halfop
Posts: 92
Joined: Sun Dec 01, 2013 3:04 am
Location: Indonesia

identify nick random

Post by abah »

Hello
Can anyone help me make a tcl to identify nicks because I have 8 nicks so every 4 hours the nicks take turns identifying without changing the bot's nick
abah - Kota Makassar - Indonesia
p
pektek
Halfop
Posts: 76
Joined: Sat Jul 01, 2023 4:51 pm
Location: TURKEY
Contact:

Re: identify nick random

Post by pektek »

User avatar
abah
Halfop
Posts: 92
Joined: Sun Dec 01, 2013 3:04 am
Location: Indonesia

Re: identify nick random

Post by abah »

pektek wrote: Sun Dec 08, 2024 1:41 am viewtopic.php?t=21669
i think no work from me
abah - Kota Makassar - Indonesia
User avatar
CrazyCat
Revered One
Posts: 1376
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: identify nick random

Post by CrazyCat »

abah wrote: Fri Dec 06, 2024 2:47 am Hello
Can anyone help me make a tcl to identify nicks because I have 8 nicks so every 4 hours the nicks take turns identifying without changing the bot's nick
I don't understand... Your eggdrop change its nick every 4h ? To keep them registered ?
You can use the proc which change its nick to send the identifying command, or you can have a proc wich bind the notice saying you must identify and send the correct identification string.
It depends on the services used by the network and if each nick has a separate password or if you alway use the same one
p
pektek
Halfop
Posts: 76
Joined: Sat Jul 01, 2023 4:51 pm
Location: TURKEY
Contact:

Re: identify nick random

Post by pektek »

User avatar
abah
Halfop
Posts: 92
Joined: Sun Dec 01, 2013 3:04 am
Location: Indonesia

Re: identify nick random

Post by abah »

pektek wrote: Thu Jan 02, 2025 2:17 pm look at this abah

https://forum.eggheads.org/viewtopic.p ... 0bb4f1817
i get error
[12:23:20] wrong # args: should be "bind type flags cmd/mask ?procname?"
while executing
"bind cron - 14 3 */2 * * identnick"
(file "nick/nick.tcl" line 23)
invoked from within
"source "$eggdrop(root)/nick.tcl""
(file "nick/settings.tcl" line 3)
invoked from within
"source nick/settings.tcl"
(file "faznet.conf" line 224)
[12:23:20] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
abah - Kota Makassar - Indonesia
User avatar
CrazyCat
Revered One
Posts: 1376
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: identify nick random

Post by CrazyCat »

Because the good bind syntax is:
bind cron - "14 3 */2 * *" identnick
User avatar
abah
Halfop
Posts: 92
Joined: Sun Dec 01, 2013 3:04 am
Location: Indonesia

Re: identify nick random

Post by abah »

CrazyCat wrote: Mon Jan 27, 2025 6:59 pm Because the good bind syntax is:
bind cron - "14 3 */2 * *" identnick
can u help me fixed him
abah - Kota Makassar - Indonesia
User avatar
CrazyCat
Revered One
Posts: 1376
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: identify nick random

Post by CrazyCat »

I gave you the good syntax, this is the one you quoted.
User avatar
abah
Halfop
Posts: 92
Joined: Sun Dec 01, 2013 3:04 am
Location: Indonesia

Re: identify nick random

Post by abah »

CrazyCat wrote: Thu Jan 30, 2025 5:51 am I gave you the good syntax, this is the one you quoted.
if i want to run at 2 times or 2 times a day. 5 am and 5 pm, is it true that the script i changed a little
bind cron - "0 5,17 * * *" identnick
abah - Kota Makassar - Indonesia
User avatar
abi
Voice
Posts: 16
Joined: Mon Feb 12, 2024 1:11 am
Location: Kota Makassar

Re: identify nick random

Post by abi »

# Fill np with nicks and password
set np {
"abikoe" "censored"
"akoeabi" "censored"
"ombul" "censored"
}

set cnp 0

proc identnick {min hour day month wod} {
putserv "NICK [lindex $::np $::cnp]"
incr ::cnp
putserv "PRIVMSG NickServ :identify [lindex $::np $::cnp]"
#change previous command to the one used on your server
if {$::cnp >= [llength $::np]} {
set ::cnp 0
} else {
incr ::cnp
}
putserv "NICK $::botnick"
}

bind cron - "0 5,17 * *" identnick
It seems like this script is not working because it does not show the identify nick process and I have tried this, is there something wrong?
p
pektek
Halfop
Posts: 76
Joined: Sat Jul 01, 2023 4:51 pm
Location: TURKEY
Contact:

Re: identify nick random

Post by pektek »

Did you mean this abah ?

Code: Select all

# --- Sequential NickServ Identify System ---
# Prepared for pektek 

# List of nicks to identify
set ns_nicklist {
    Nick1
    Nick2
    Nick3
    Nick4
    Nick5
    Nick6
    Nick7
    Nick8
}

# Password for NickServ (if all nicks use the same password)
set ns_password "YOURPASSWORD"

# Keeps track of the current index in the nick list
set ns_index 0

# Interval: 4 hours = 14400 seconds
set ns_interval 14400


# Function to send NickServ IDENTIFY
proc ns_identify {} {
    global ns_nicklist ns_password ns_index ns_interval

    # Select current nick
    set nick [lindex $ns_nicklist $ns_index]

    # Send IDENTIFY command
    putserv "PRIVMSG NickServ :IDENTIFY $nick $ns_password"

    putlog "NickServ IDENTIFY sent for nick: $nick"

    # Move to next nick
    incr ns_index
    if {$ns_index >= [llength $ns_nicklist]} {
        set ns_index 0
    }

    # Schedule next run
    utimer $ns_interval ns_identify
}

# Start system when bot connects to server
bind evnt - init-server ns_start

proc ns_start {type} {
    global ns_interval
    putlog "Sequential NickServ Identify System Started."
    utimer 10 ns_identify
}
When the bot connects, the system starts after 10 seconds.

It sends NickServ:

/msg NickServ IDENTIFY <nick> <password>
Every 4 hours it switches to the next nick in the list.

After all 8 nicks are done, it loops back to the first nick.

Your bot’s actual IRC nickname never changes.


Does it work or not ? If not, what are the errors ?

and

It seems like this script is not working because it does not show the identify nick process and I have tried this, is there something wrong?

the answer is below

Code: Select all

# Nick + password list (each entry is a pair: {nick pass})
set np {
    {"abikoe" "censored"}
    {"akoeabi" "censored"}
    {"ombul"  "censored"}
}

# Counter for which nick to use
set cnp 0

proc identnick {min hour day month wod} {

    # Total number of nick-pass pairs
    set total [llength $::np]

    # Reset index if out of range
    if {$::cnp >= $total} {
        set ::cnp 0
    }

    # Get the current nick-pass pair
    set pair [lindex $::np $::cnp]
    set nick [lindex $pair 0]
    set pass [lindex $pair 1]

    # Security check
    if {$nick eq "" || $pass eq ""} {
        putlog "Warning: Nick or password is empty. Identification skipped!"
        return
    }

    # Change nick
    putserv "NICK $nick"

    # Identify to NickServ
    putserv "PRIVMSG NickServ :IDENTIFY $pass"

    # Move to next pair for the next run
    incr ::cnp

    # Switch back to the bot's main nickname after 2 seconds
    utimer 2 [list putserv "NICK $::botnick"]

    # Log message
    putlog "Auto-ident: Logged in to NickServ using nick $nick."
}

# Runs every day at 05:00 and 17:00
bind cron - "0 5,17 * *" identnick
Post Reply