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.

Sajoin??

Help for those learning Tcl or writing their own scripts.
Post Reply
p
pektek
Halfop
Posts: 55
Joined: Sat Jul 01, 2023 4:51 pm

Sajoin??

Post by pektek »

When the channel enters op, pull to the other channel ?

for example

AlemFM used join #Dj

pull to common channel

NoMercy used SAJOIN to make AlemFM join #DjSohbet
Last edited by pektek on Wed Apr 10, 2024 4:15 am, edited 1 time in total.
User avatar
CrazyCat
Revered One
Posts: 1306
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: Sajoin?

Post by CrazyCat »

First, your eggdrop must be ircop to use these feature. Invite seems better, user join if he want.
And which criteria do you want to use to make user coming into target channel ? Everybody ?

BTW, here is the simplest script:
set ctarget "#djsohbet"
set cfrom "#dj"
proc forcejoin {nick uhost handle chan} {
   if {[string equal -nocase $chan $::cfrom] && [lsearch [chanlist $::ctarget] $nick]==-1} {
      putserv "SAJOIN $nick $::ctarget"
   }
}
bind join - "$::cfrom *" forcejoin
p
pektek
Halfop
Posts: 55
Joined: Sat Jul 01, 2023 4:51 pm

Re: Sajoin?

Post by pektek »

[10:50:10] Tcl error [forcejoin]: invalid channel: #djsohbet
User avatar
CrazyCat
Revered One
Posts: 1306
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: Sajoin??

Post by CrazyCat »

If your eggdrop is not on the target channel, it's normal.
You can choose between 2 options:
1. have your eggdrop on #djsohbet and it'll work without error
2. remove the && [lsearch [chanlist $::ctarget] $nick]==-1 part in the condition and your eggdrop will do the sajoin command even if the user is already on the channel.
p
pektek
Halfop
Posts: 55
Joined: Sat Jul 01, 2023 4:51 pm

Re: Sajoin??

Post by pektek »

perfect thank you crazycat
Post Reply