egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

custom pushmode
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
ComputerTech
Op


Joined: 22 Feb 2020
Posts: 138
Location: Northern Ireland

PostPosted: Tue May 05, 2020 5:47 pm    Post subject: Reply with quote

why not just like this

Code:

putserv "mode $chan +a"
putserv "mode $chan +a"
putserv "mode $chan +a"


or something like that use that as a example
all under the same proc

and you can replace putserv with putnow or putquick Very Happy
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
simo
Master


Joined: 22 Mar 2015
Posts: 438

PostPosted: Wed May 06, 2020 12:44 pm    Post subject: Reply with quote

if your willing to help out would be apreciated caesar or anyone else who knows tcl the idea is to be able to send stacked and single modes to massmode and to have massmode stack them by itselve just like pushmode does only pushmode doesnt recognize all chanmodes thets the reason for wanting to use a custom pushmode that makes it also usefull for scripts i use that send single modes in mass but sent one by one
_________________
Coming together is a beginning, staying together is progress, working together is succes.
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3645
Location: Mint Factory

PostPosted: Thu May 07, 2020 12:56 am    Post subject: Reply with quote

I looked at eggdrop's source code on GitHub and I don't see anything limiting what modes the 'pusmode' can set:
Code:

static int tcl_pushmode STDVAR
{
  struct chanset_t *chan;
  char plus, mode;

  BADARGS(3, 4, " channel mode ?arg?");

  chan = findchan_by_dname(argv[1]);
  if (chan == NULL) {
    Tcl_AppendResult(irp, "invalid channel: ", argv[1], NULL);
    return TCL_ERROR;
  }
  plus = argv[2][0];

  mode = argv[2][1];
  if ((plus != '+') && (plus != '-')) {
    mode = plus;
    plus = '+';
  }
  if (argc == 4)
    add_mode(chan, plus, mode, argv[3]);
  else
    add_mode(chan, plus, mode, "");
  return TCL_OK;
}

If you do a
Code:

.tcl puthelp "MODE #channel +a"

for example, dose it work?

Apart the 'a' flag, what other channel flags don't work?
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1095

PostPosted: Thu May 07, 2020 1:33 am    Post subject: Reply with quote

caesar wrote:
I looked at eggdrop's source code on GitHub and I don't see anything limiting what modes the 'pusmode' can set:


I suspect that the problem isn't that. I think it is that pushmode can take another argument, with only some modes. An example would be +o .
As in: pushmode #chan +o somenick

I think that +a is such a mode where it cannot. And I think that's where the snag is. It's not taking a nick as an argument, after the mode value - if it is "a".

Let's see what the original poster has to say. I hope understood it.

To really be sure of what is going on, wouldn't the thing to do be : enable the use of the r and v flags in the console, for bot owner, and then add them to console?
THEN do the .tcl command you proposed, along with some others, and compare and really see what is going on?
_________________
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 438

PostPosted: Thu May 07, 2020 4:07 am    Post subject: Reply with quote

The thing about pushmode is u cant send for example: pushmode $chan +bo-v bmask nick nick and a normal mode setting like the example you gave would not even be set if max allowed on ircd was exceeded not to mention it does not do any stacking by itself.
The idea with a custom pushmode proc is it would take both stacked and single modes and stack them using modes-per-line and wouldnt have any limitations when it comes to chanmodes like pushmode seems to have
i hope the point im trying to make is a bit more clear

Tnx in advance
_________________
Coming together is a beginning, staying together is progress, working together is succes.
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3645
Location: Mint Factory

PostPosted: Thu May 07, 2020 7:26 am    Post subject: Reply with quote

@willyw : It takes a minimum of 2 or maximum of 3 arguments. The first being the channel, second is the mode change (if there's no + or - sign in the 'mode' then it will add a + by default) and finally last one is the argument one of the modes that need one, for example limit or channel key.

I looked at the code and don't see where the snag comes from.

@simo: You talk about two things in one:

- one function that would stack let's say you got 20 elements and want to take out 5 at a time. This is doable and isn't much of an issue.

- 'single modes' to be stacked that's basically means reinventing the wheel, or simpler put a new queue system that would accept any form of input and stack the output in a time frame.

Wouldn't be easier if you try to send a stack stuff to be split or delay those single mode change until would have a stack in your proc?

I'll have a try at this but not right now cos got some stuff at work that need my attention.
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 438

PostPosted: Thu May 07, 2020 8:56 am    Post subject: Reply with quote

tnx in advance caesar
_________________
Coming together is a beginning, staying together is progress, working together is succes.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber